Hi Ceramist,
The simplest way to overcome this error is to enable Anonymous Authentication.
You can do that in IIS by selecting your site >> Authentication.
If you must run with Anonymous authentication disabled, you should follow the steps below:
- Disable “Anonymous” authentication and enable your authentication of choice for the application’s virtual directory in IIS
- In the web.config, add <location> elements to enable “Anonymous” authentication for all of your .svc files (you still need anonymous authentication to start the service):
<location path="EntityService.svc">
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
<location path="EntityServer.svc">
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
- Unlock the “authentication” elements in the computer’s “applicationHost.config” file.
-- On 32-bit systems: C:\Windows\System32\inetsrv\config
-- Change overrideModeDefault="Deny" to overrideModeDefault="Allow" for all authentication types
<sectionGroup name="authentication">
<section name="anonymousAuthentication" overrideModeDefault="Allow" />
<section name="basicAuthentication" overrideModeDefault="Allow" />
<section name="clientCertificateMappingAuthentication" overrideModeDefault="Allow" />
<section name="digestAuthentication" overrideModeDefault="Allow" />
<section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Allow" />
<section name="windowsAuthentication" overrideModeDefault="Allow" />
</sectionGroup>
Test by manually browsing to the service file names.
I hope this helps,
Silvio.
Edited by sbelini - 21-Dec-2011 at 10:58am