WCF配置文件模板

来源:互联网 发布:再见真选组篇 知乎 编辑:程序博客网 时间:2024/05/03 22:01

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
    <system.serviceModel>
      <bindings>
        <wsHttpBinding>
          <binding name="windowsBinding">
            <security mode="TransportWithMessageCredential">
              <transport clientCredentialType="Windows"/>
            </security>
          </binding>
        </wsHttpBinding>
      </bindings>
      <services>
        <service name="SilverlightWCFTest.Web.GetUserInfoService" behaviorConfiguration="myServiceBehavior">
          <endpoint address="" binding="wsHttpBinding" bindingConfiguration="windowsBinding" contract="SilverlightWCFTest.Web.IMyTestService">
            <identity>
              <dns value="localhost"/>
            </identity>
          </endpoint>
          <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
          <host>
            <baseAddresses>
              <add baseAddress="http://localhost:3547/"/>
            </baseAddresses>
          </host>
        </service>
      </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="myServiceBehavior">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
</configuration>