webconfig 服务端配置

该配置文件详细定义了一个ASP.NET应用程序的数据连接字符串,编译设置以及WS2007HttpBinding的安全和服务行为。它包含了服务的身份验证、最大消息大小、安全模式(TransportWithMessageCredential)以及使用MembershipProvider的用户名认证。此外,还设置了服务证书和元数据交换端点。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<?xml version="1.0" encoding="utf-8"?>

<!--
  如需如何設定 ASP.NET 應用程式的詳細資訊,請造訪
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <add name="AUTH_SERVICEConnectionString" connectionString="Data Source=au3epoweb1;Initial Catalog=AUTH_SERVICE;Persist Security Info=True;User ID=auth_ap;Password=auth_ap"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <!--special for bistest-->
    <httpHandlers>
      <remove verb="*" path="*.asmx" />
      <remove verb="POST,GET" path="ajax/*.ashx" />
    </httpHandlers>
  </system.web>

  <system.serviceModel>
    <bindings>
  
      <ws2007HttpBinding>
        <binding name="wsHttpEndpointBinding" closeTimeout="00:30:00"
              openTimeout="00:30:00" receiveTimeout="00:30:00" sendTimeout="00:30:00"
              bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
              maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
              messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
              allowCookies="false">
          <readerQuotas maxDepth="32" maxStringContentLength="2147483647"
            maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="TransportWithMessageCredential">
            <transport clientCredentialType="None" />
            <message clientCredentialType="UserName" />
          </security>
        </binding>
      </ws2007HttpBinding>
    </bindings>

    <services>
      <service name="AuthService.WcfService1" behaviorConfiguration="ServiceBehavior">
        <endpoint address="" binding="ws2007HttpBinding" bindingConfiguration="wsHttpEndpointBinding"
                  contract="AuthService.IWcfService1">
          <identity>
            <dns  value="*.corpnet.auo.com"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
    </services>

    <behaviors>
      <!--自己设定-->
      <serviceBehaviors>
        <behavior name="ServiceBehavior">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceCredentials>
            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" />
            <serviceCertificate storeLocation="LocalMachine" storeName="My" findValue="*.corpnet.auo.com"
                                x509FindType="FindBySubjectName" />
          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
      <!--自己设定 END-->
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

</configuration>
 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值