Web API Anonymous Authentication And IIS Express

I’ve been tested a Web API web service and I needed an anonymous authentication. This can be done with attribute [AllowAnonymous].
You can decorate a whole controller

or a particular method(s)

The most curious thing is that it does not work when you run Visual Studio debugger! The secret is hidden in the properties of the Web API project. Click the project in Solution Explorer, then press F4 (don’t choose Properties from context menu). Here you will see authentication settings.


All these properties are saved in .csproj file.

Leave a Reply

Your email address will not be published. Required fields are marked *