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

新手写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>

  

最新文章

  1. 搭建一套自己实用的.net架构(3)【ORM-Dapper+DapperExtensions】
  2. 2016年12月31日 星期六 --出埃及记 Exodus 21:26
  3. 在iis7上如何配置来看到asp报错
  4. C语言拾遗
  5. Android Stutio -- 编译报错: Error:File path too long on Windows, keep below 240
  6. python display color output
  7. 转 vagrant package[打包命令]详解
  8. Zookeeper + Hadoop2.6 集群HA + spark1.6完整搭建与所有参数解析
  9. OAuth2.0_豆瓣登录_API错误返回码说明一览表[转]
  10. 一个简单的AJAX实例
  11. mongodb 操作语句与sql操作语句对比
  12. Window Pains
  13. Jquery autocomplete 插件示例
  14. 自定义控件之--继承控件(圆形TextView)
  15. 财付通API
  16. JavaScript获取客户端IP地址
  17. codeforces 3b之贪心算法
  18. 初学mybatis和mysql碰到的问题
  19. sequelize查询数据的日期格式化
  20. Go指南练习_斐波纳契闭包

热门文章

  1. RESTLET开发实例
  2. fuse文件系统
  3. Oracle-查看oracle是否有表被锁
  4. hdoj 1872 稳定排序
  5. AVR ISP
  6. 关于Windows文件名和路径名的那些事
  7. Asp.Net Core- 多样性的配置来源
  8. HDU 3452 Bonsai(网络流之最小割)
  9. HDU 5501 The Highest Mark 背包dp
  10. 第二周:01 ICP迭代交互