SPWeb.AllowAnonymousAccess property
SharePoint 2013
Gets a Boolean value that indicates whether anonymous access is allowed for the website.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Gets a Boolean value that indicates whether anonymous access is allowed for the website.