developers.de
daenet's .NET Community

Working with IIS7 Authentication and WCF

Damir Dobric Posts

 

Damir@Phone    



My upcoming sessions:

AppFabric Applications at
NRW Conf 2011
09.Sept.2011 Wuppertal

HTML5 widgets in WP7+
Monodroid
Mobility Day
21.Sept.2011 - Zagreb

AppFabric and WCF sessions at
Advanced Developer Conference
26.-27. Oktober 2011 in Frankenthal

AppFabric Applications, queues, topics and more at
Prio Conference
02. - 03. November 2011 in Meistersingerhalle Nürnberg

AppFabric Applications deep dive hosted by
.NET User Group Frankfurt
17.Nov.2011 18.30-22.30 Microsoft - Bad Homburg 

 

 

When hosting your service in IIS, sometimes you may decide to protect it by using of for example Basic Authentication. In this case I assume that secured transport (ssl) is used, because the username and password are base64 encoded (clear text).

Unfortunately, in this case you may get following error, which can be confusing:

Server Error in '/' Application.


Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

This error appears if you have setup your IIS-application to use Basic Authentication only (Anonymous Authentication is disabled).

image

Usually the error will appear in this case if you have configured an additional endpoint which requires anonymous authentication, like MexHttpBindig.

Solution

1. Enable Anonymous authentication (required by MEX-Binding) or
2. Remove MEX-Binding from configuration file.


Posted Dec 23 2008, 10:50 PM by Damir Dobric
Filed under:

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
daenet GmbH