当前位置 : 主页 > 网页制作 > Nodejs >

测试好用的Webservice Json WCF 发布用到配置文件备用

来源:互联网 收集:自由互联 发布时间:2021-06-24
测试好用的Webservice Json WCF 发布用到配置文件备用,避免遗忘,整整琢磨了一个星期! ?xml version="1.0" encoding="utf-8"?configuration connectionStrings add name="ConnectionString" connectionString="Data Source=


测试好用的Webservice Json WCF 发布用到配置文件备用,避免遗忘,整整琢磨了一个星期!

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <connectionStrings>
      <add name="ConnectionString" connectionString="Data Source=localhost\SQLEXPRESS;Initial Catalog=########;Integrated Security=True" />
    </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <client>
      <endpoint address="http://localhost:8733/Niewei.Enterprise.OPCServer.wcfservice/OPCServerService/"
        binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IOPCServerService"
        contract="MyOPCServerService.IOPCServerService" name="WSHttpBinding_IOPCServerService">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IOPCServerService" />
      </wsHttpBinding>
      <webHttpBinding>
        <binding name="NewBinding0" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
          maxReceivedMessageSize="2147483647" transferMode="Streamed">
          <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647"
            maxBytesPerRead="2147483647" />
          <security mode="None" />
        </binding>
      </webHttpBinding>
    </bindings>
    <behaviors>

      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="httpBehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <services>
      <service name="AndroidWebServer.MainService">
        <endpoint address="" behaviorConfiguration="httpBehavior" binding="webHttpBinding"
          bindingConfiguration="NewBinding0" contract="AndroidWebServer.IMainService" />
      </service>
    </services>
  </system.serviceModel>
  
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <directoryBrowse enabled="true"/>
  </system.webServer>
</configuration>
网友评论