1) On Machine A - I have created an WCF service and hosted it IIS 5.1, on MachineA. which is running under this URL http://mydomain/SetupPOCService/Service1.svc
2) On Machine B - I created an Asp.net Web Applciation. In this application I tried to consume the previously created WCF service which is now hosted on another m/c i.e. MachineA. When I run this web application from Visual Studio environment, it access that MachineA's WCF service and get the data.
---Fine till here---
3) On Machine B - Now I hosted My Web Application in IIS5.1 This web application is working fine here but could not able to acces that MachineA's WCF service and giving this kind of error.
The remote server returned an error: (401) Unauthorized.
StackTrace [MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate,NTLM'.]
I tried so many things but it dint helped. Please give your inputs...
Below is Web.Config for client
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
Below is Web.Config for Server
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>