zoukankan      html  css  js  c++  java
  • 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>
    

      

  • 相关阅读:
    Web相关工具
    web服务器之ApacheCookie 和 session
    web服务器之Apache语法与使用
    Java高并发3-中断线程以及isInterrupted与interrupted区别
    从零开始学VUE之Vue CLI(Cli 2.x 初始化项目)
    从零开始学VUE之Vue CLI(全局安装cli-init)
    从零开始学VUE之Vue CLI(全局安装 CLI)
    从零开始学VUE之淘宝镜像Cnpm安装
    IDEA 过期时间 试用时间 重置插件
    ElementUI el-checkbox 点击Label不取消复选框的选中状态
  • 原文地址:https://www.cnblogs.com/rickgao/p/5505974.html
Copyright © 2011-2022 走看看