rest的config
<个人积累,转载请注明出处>
新手写rest wcf经常会报配置文件异常。我为了避免这种问题,将自己配好的config放这里,用的时候将ABC改成自己的,粘贴就行了。
ABC是什么我就不赘述了,给个链接 http://blog.csdn.net/lglgsy456/article/details/7637332
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="Akmii.Chint.Service.test">
<endpoint address="" behaviorConfiguration="RestBehavior" binding="webHttpBinding"
bindingConfiguration="HttpBinds" contract="Akmii.Chint.Service.test" />
</service>
<service name="Akmii.Chint.Service.SendRest">
<endpoint address="" behaviorConfiguration="Akmii.Chint.Service.SendRestAspNetAjaxBehavior"
binding="webHttpBinding" contract="Akmii.Chint.Service.SendRest" />
</service>
<service name="Akmii.Chint.Service.ReceiveRest">
<endpoint address="" behaviorConfiguration="Akmii.Chint.Service.ReceiveRestAspNetAjaxBehavior"
binding="webHttpBinding" contract="Akmii.Chint.Service.ReceiveRest" />
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="RestBehavior">
<webHttp helpEnabled="true" defaultBodyStyle="Bare" defaultOutgoingResponseFormat="Json" />
</behavior>
<behavior name="Akmii.Chint.Service.SendRestAspNetAjaxBehavior">
<enableWebScript />
</behavior>
<behavior name="Akmii.Chint.Service.ReceiveRestAspNetAjaxBehavior">
<enableWebScript />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
<bindings>
<webHttpBinding>
<binding name="HttpsBinds">
<security mode="Transport"></security>
</binding>
<binding name="HttpBinds" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"></binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
rest的config的更多相关文章
- 一步步开发自己的博客 .NET版(11、Web.config文件的读取和修改)
Web.config的读取 对于Web.config的读取大家都很属性了.平时我们用得比较多的就是appSettings节点下配置.如: 我们对应的代码是: = ConfigurationManage ...
- Discuz NT 架构剖析之Config机制
接触了Discuz NT! 一段时间了,是时候做个总结了,标题好霸气,有木有? 都是托园子里的大牛代振军的福啊,哈哈哈哈. 首先论坛的信息不是完全存储在数据库里面的,一部分信息存储在config文件里 ...
- [笔记]HAproxy reload config file with uninterrupt session
HAProxy is a high performance load balancer. It is very light-weight, and free, making it a great op ...
- MyBatis2:config.xml文件
前言 前一篇文章,讲了MyBatis入门,讲到了MyBatis有两个基本的配置文件,一个用来配置环境信息,一个用来写SQL语句.前者我把它命名为config.xml,config.xml的内容是: & ...
- 搞了我一下午竟然是web.config少写了一个点
Safari手机版居然有个这么愚蠢的bug,浪费了我整个下午,使尽浑身解数,国内国外网站搜索解决方案,每一行代码读了又想想了又读如此不知道多少遍,想破脑袋也想不通到底哪里出了问题,结果竟然是web.c ...
- WCF中,通过C#代码或App.config配置文件创建ServiceHost类
C# static void Main(string[] args) { //创建宿主的基地址 Uri baseAddress = new Uri("http://localhost:808 ...
- myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
把myeclipse10 按照目录完整拷贝到了另外一台电脑, 另外的目录 原安装目录 D\:\soft\i\myeclipse10 新安装目录 E\:\soft\myeclipse10 双击启动失败, ...
- PHP扩展-如何使用文件config.m4
config.m4文件用于指定正在开发的扩展在类unix系统下构建时支持的选项,指定此扩展需要哪些库以及哪些源文件:使用 GNU autoconf 语法编写.注意需要重新执行phpize,config ...
- RabbitMQ Config
默认访问地址:http://localhost:15672/ 要想修改内网访问: %APPDATA%\RabbitMQ\ 目录下添加文件 rabbitmq.config [ {rabbit, [%% ...
- C# 读取app.config配置文件 节点键值,提示 "配置系统未能初始化" 错误的解决方案
新建C#项目,在app.config中添加了appSettings项,运行时出现"配置系统未能初始化"的错误,MSDN里写到,如果配置文件中包含 configSections 元素 ...
随机推荐
- 跨平台的游戏客户端Socket封装,调整
原文链接:http://www.cnblogs.com/lancidie/archive/2013/04/13/3019359.html 头文件: #pragma once #ifdef WIN32 ...
- IP查找工具——angry IP Scanner
作用] 若树莓派没有屏幕可通过该工具查找树莓派的IP地址.例如下图的树莓派IP地址可能为192.168.1.107. 图1 IP scan查找树莓派IP地址
- 更新yum到 163
cdh4 yum安装; http://www.cloudera.com/content/support/en/documentation/cdh4-documentation/cdh4-documen ...
- hdu3315-My Brute(费用流 or KM算法)
题目:My Brute Seaco是一个漂亮的妹子,喜欢玩一款名叫My Brute的游戏.情人节快到了,starvae和xingxing都想邀请妹子过节,但是妹子只能陪一个啊,于是两个人决定打一架,用 ...
- SQL2008-分页显示3种方法
方法1: 适用于 SQL Server 2000/2005/2008 SELECT TOP 10 * FROM YieldRole WHERE id NOT IN ( SELECT TOP (10*( ...
- Spider Studio 数据挖掘集成开发环境
(最新版本: 2.7.12.1) 传统的多线程蜘蛛程序虽然采集速度快, 但是明明不需要所有内容, 却胡子眉毛一把抓, 将整个网页都下载下来当作一个文本进行处理. 由于网页内容参差不齐, 所以抓取质量常 ...
- Python中如何把一个UTC时间转换为本地时间
需求: 将20141126010101格式UTC时间转换为本地时间. 在网上搜了好长时间都没有找到完美的解决方案.有的引用了第三方库,这就需要在现网安装第三方的软件.这个是万万不可的.因为真实环境不一 ...
- ECSHOP模板标签
模板制作修改经常用到ecshop模板标签: 页面关键字 {$keywords }页面标题 {$page_title}产品分类父分类列表 {foreach from=$categories item=c ...
- inferred 和 freefrom
“Inferred” is the default setting for storyboards and it means the scene will show a navigation bar ...
- 一个使用CDS VIEW 的 DEMO
一个使用CDS VIEW 的demo REPORT demo_cds_currency_conversion. CLASS demo DEFINITION. PUBLIC SECTION. CLASS ...