Ensuring Anonymous Access is Configured on a SharePoint 2010 Web Application using Claims Based Authentication

Creating SharePoint 2010 web applications using claims based authentication and at the same time having anonymous authentication enabled has been an inconsistent process. Sometimes it works fine and the anonymous user can browse through the site, but other times it keeps asking for credentials. I couldn’t find the reason on why it was asking for credentials. Digging on the SharePoint 2010 Powershell commands, I found the following command to get details about the authentication provider for one web application: Get-SPAuthenticationProvider.

$authprov = Get-SPAuthenticationProvider -WebApplication [web application URL] -Zone [zone]

Check the AllowAnonymous property:

$authprov.AllowAnonymous 

To change it:

$authprov = Get-SPAuthenticationProvider -WebApplication http://yourwebapplicationurl.com -Zone Default
$authprov.AllowAnonymous = 1

List the setting again to make sure the anonymous access has been set.

See you,

Amadeu.