<个人积累,转载请注明出处>

新手写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的更多相关文章

  1. 一步步开发自己的博客 .NET版(11、Web.config文件的读取和修改)

    Web.config的读取 对于Web.config的读取大家都很属性了.平时我们用得比较多的就是appSettings节点下配置.如: 我们对应的代码是: = ConfigurationManage ...

  2. Discuz NT 架构剖析之Config机制

    接触了Discuz NT! 一段时间了,是时候做个总结了,标题好霸气,有木有? 都是托园子里的大牛代振军的福啊,哈哈哈哈. 首先论坛的信息不是完全存储在数据库里面的,一部分信息存储在config文件里 ...

  3. [笔记]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 ...

  4. MyBatis2:config.xml文件

    前言 前一篇文章,讲了MyBatis入门,讲到了MyBatis有两个基本的配置文件,一个用来配置环境信息,一个用来写SQL语句.前者我把它命名为config.xml,config.xml的内容是: & ...

  5. 搞了我一下午竟然是web.config少写了一个点

    Safari手机版居然有个这么愚蠢的bug,浪费了我整个下午,使尽浑身解数,国内国外网站搜索解决方案,每一行代码读了又想想了又读如此不知道多少遍,想破脑袋也想不通到底哪里出了问题,结果竟然是web.c ...

  6. WCF中,通过C#代码或App.config配置文件创建ServiceHost类

    C# static void Main(string[] args) { //创建宿主的基地址 Uri baseAddress = new Uri("http://localhost:808 ...

  7. 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 双击启动失败, ...

  8. PHP扩展-如何使用文件config.m4

    config.m4文件用于指定正在开发的扩展在类unix系统下构建时支持的选项,指定此扩展需要哪些库以及哪些源文件:使用 GNU autoconf 语法编写.注意需要重新执行phpize,config ...

  9. RabbitMQ Config

    默认访问地址:http://localhost:15672/ 要想修改内网访问: %APPDATA%\RabbitMQ\ 目录下添加文件 rabbitmq.config [ {rabbit, [%% ...

  10. C# 读取app.config配置文件 节点键值,提示 "配置系统未能初始化" 错误的解决方案

    新建C#项目,在app.config中添加了appSettings项,运行时出现"配置系统未能初始化"的错误,MSDN里写到,如果配置文件中包含 configSections 元素 ...

随机推荐

  1. varchar

    mysql varchar(50) 不管中文 还是英文 都是存50个的 MySQL5的文档,其中对varchar字段类型这样描述:varchar(m) 变长字符串.M 表示最大列长度.M的范围是0到6 ...

  2. Bzoj-2705 Longge的问题 欧拉函数

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2705 题意: 求 sigma(gcd(i,n), 1<=i<=n<2^3 ...

  3. Java & XML Tutorial

    Java comes with a set of tools to process XML. These Java XML tools are: SAX Parser StAX Parser DOM ...

  4. AVR抗干扰能力一般

    在485通信中,为了方便测试,在485 芯片前端加下了插测好测试量,可是用TTL直接通信, 但是,在实际的PCB测试中,9600 的波特率下不小心用手碰了P5插针,会现大量的数量错误, 后来在Tx和R ...

  5. web开发工具类

    1.日期工具类 import java.text.SimpleDateFormat; import java.util.Date; public class DateUtil { public sta ...

  6. view 与layer

      文章出处:http://blog.csdn.net/iukey 一.添加 Quartz Core 框架 要使用 Quartz Core 框架,你需要将其添加到你的工程中 . 然后  #import ...

  7. 完全分布式Hadoop2.3安装与配置

    一.Hadoop基本介绍 Hadoop优点 1.高可靠性:Hadoop按位存储和处理数据 2.高扩展性:Hadoop是在计算机集群中完成计算任务,这个集群可以方便的扩展到几千台 3.高效性:Hadoo ...

  8. JBoss7快速入门

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...

  9. 给postfix设置黑名单

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...

  10. android常见错误-The container 'Android Dependencies' references non existing library

    The container 'Android Dependencies' references non existing library