0


I have been trying to get my WCF to work with Windows Authentication. The following works fine when anonymous is turned on. Have searched many internet articles and cannot get this to work. Thanks

Here is my configuration:
IIS
Basic Authentication and Windows Authentication turned on.
Anonymous turned off

CLIENT:

<system.serviceModel>
    <bindings>
        <wsHttpBinding>
            <binding name="WSHttpBinding_IEchoService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
                textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="false" />
                <security mode="Message">
                    <transport clientCredentialType="Windows" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true"
                        algorithmSuite="Default" establishSecurityContext="true" />
                </security>
            </binding>

        </wsHttpBinding>
    </bindings>

    <client>
        <endpoint address="http://id.unittest/Services/EchoService.svc"
            binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IEchoService"
            contract="IEchoService" name="WSHttpBinding_IEchoService">
            <identity>
                <servicePrincipalName value="host/mikev-ws" />
            </identity>
        </endpoint>
    </client>
</system.serviceModel>

SERVER:

<system.serviceModel>

    <behaviors>
        <serviceBehaviors>
            <behavior name="MyServiceTypeBehaviors">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <services>
        <service name="Project.API.Services.EchoService" behaviorConfiguration="MyServiceTypeBehaviors">
            <endpoint address="" binding="wsHttpBinding" contract="Project.API.Services.IEchoService" />
            <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex"/>
        </service>
    </services>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>

</system.serviceModel>
Valamas
  • 24,169
  • 25
  • 107
  • 177

1 Answers1

0

in the following link: WCF error: The caller was not authenticated by the service

look for the answer given by Sandip, its the second answer.

Community
  • 1
  • 1
Roberto Alarcon
  • 1,430
  • 2
  • 18
  • 32
  • thank you for the suggestion as it helped me in my endless search which took days. I am no closer to a solution. I am going to ask a new question that includes a sandbox project. My bet is that others will find you link to the other page useful. – Valamas Mar 29 '11 at 04:56