加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-16 22:04:26 所属栏目:安全 来源:网络整理
导读:测试好用的Webservice Json WCF 发布用到配置文件备用,避免遗忘,整整琢磨了一个星期! ?xml version="1.0" encoding="utf-8"?configuration connectionStrings add name="ConnectionString" connectionString="Data Source=localhostSQLEXPRESS;Initial C


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

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <connectionStrings>
      <add name="ConnectionString" connectionString="Data Source=localhostSQLEXPRESS;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>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读