вторник, 10 мая 2011 г.

Working Example of Web.config for WCF-Service IIS hosted for Silverlight with Windows Authentication


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

<!--
  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" />
        <customErrors mode="RemoteOnly" />
        <authentication mode="Windows" />
      </system.web>
    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior name="">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="true" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
        <services>
            <service name="web4.TsService">
              <endpoint address="" binding="basicHttpBinding" bindingConfiguration="web4.TsService.customBinding0" contract="web4.TsService">
                  <identity>
                    <dns value="MyDomainName" />
                  </identity>
                  </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
              <host>
                <baseAddresses>
                  <add baseAddress="http://MyServerName.MyDomainName:8080/tfs/web4/"/>
                </baseAddresses>
              </host>
            </service>
        </services>
        <bindings>
            <basicHttpBinding>
                <binding name="web4.TsService.customBinding0">
                  <security mode="TransportCredentialOnly">
                    <transport clientCredentialType="Ntlm"></transport>
                  </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client />
    </system.serviceModel>
</configuration>

Комментариев нет:

Отправить комментарий