We host WCF services and asp.net site on the same machine, both in IIS under Network Service
account.
Both sites have Anonymous and Windows authentication enabled.
The service uses WsHttpBinding
When we call the service from WCF Test Client
everything works fine as it sends regular domain user credentials, but when asp.net calls the service we get the exception:
Type : System.ServiceModel.Security.SecurityNegotiationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : The caller was not authenticated by the service.
It seems like NT AUTHORITY\NETWORK SERVICE
is not get authenticated, but I do not know why.
Here is config parts:
<service name="Wumte.Server.Host.EDocumentsCreationNonDual">
<endpoint address="" binding="wsHttpBinding" contract="Wumte.Server.Host.IEDocumentsCreationNonDual" bindingConfiguration="LargeMessageWsHttpBinding">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
<wsHttpBinding>
<binding name="LargeMessageWsHttpBinding" maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
</binding>
</wsHttpBinding>