Hi,
I'm implementing my first WCF application. Everything works fine if I
host it in the development web server, but when I add the virtual
directory to IIS I start getting the following error:
"System.ServiceModel.Security.MessageSecurityExcep tion: The HTTP
request is unauthorized with client authentication scheme 'Anonymous'.
The authentication header received from the server was
'Negotiate,NTLM'."
I get this error both in my own application and in the wcfTestClient.
IIS is configured to use NT Authentication, and to allow anonymous
access. I have an asmx file in the same project that I can access.
I have two endpoints defined, one for basicHttpBinding and one for
wsHttpBinding. I have not changed the app.config from what was
generated when adding the wcf webservice reference to my project.
Code:
Dim Service As New
WcfService.ifcServiceClient("BasicHttpBinding_ifcS ervice")
Dim objResult As clsTestObject = Service.GetTestObject
Config
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ifcService"
closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8"
transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32"
maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName"
algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="WSHttpBinding_ifcService"
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://localhost/Service.svc"
binding="wsHttpBinding"
bindingConfiguration="WSHttpBinding_ifcService"
contract="WcfService.ifcService"
name="WSHttpBinding_ifcService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="http://localhost/Service.svc/basic"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ifcService"
contract="WcfService.ifcService"
name="BasicHttpBinding_ifcService" />
</client>
</system.serviceModel>
Please help.
Thanks,
Chris McKenzie
Plenase