Reputation: 11263
We have a simple WCF (on .NET 4.0) Service which uses Windows
authentication and same is enabled on the IIS 7 Authentication feature. This works with same settings and same configuration on two servers, but on one of the server comes back with error Security settings for this service require Windows Authentication but it is not enabled for the IIS application that hosts this service.
I checked everything possible on web, and tried all the options like disabling other Authentication mechanisms etc. Nothing seems to be working. Could anyone point what can be the issue.
Again identical settigns on two servers is working perfectly on third server it has the issue.
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="ABCDbConnection" value="Data Source=xxx; Initial Catalog=sss;Integrated Security=True"/>
<add key="MetadataDbConnection" value="Data Source=xxx; Initial Catalog=sss;Integrated Security=True"/>
<add key="UsageEnabled" value="True"/>
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<protocolMapping>
<add scheme="http" binding="basicHttpBinding" bindingConfiguration="WindowsBasicHttpBinding"/>
</protocolMapping>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<dataContractSerializer maxItemsInObjectGraph="6553600"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="WindowsBasicHttpBinding">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Upvotes: 3
Views: 9653
Reputation: 598
Have you tried enabling Windows Authentication through the web.config using
<system.web>
....
<authentication mode="Windows" />
.....
</system.web>
There could be the possibility that one machine is inheriting this setting from a parent configuration file but not on the one throwing the error is not.
You can also verify that Anonymous Authentication is disabled like in the image below
Upvotes: 2
Reputation: 15579
Did any of the solutions in this thread work?
http://social.msdn.microsoft.com/Forums/en/wcf/thread/021babc6-2009-4ed9-81f4-ac48cc300c94
From this blog post, it mentioned this KB article.
If this error is returned and Windows Authentication has been enabled in IIS, it means there is an issue with the supported network authentication schemes for the website that the web service is installed under. The most likely cause is that it is configured for NTLM only. We want to specify NTLM and Negotiate.
Upvotes: 2