Condividi tramite


SPSecurity.WebConfigAllowsAnonymous Property

Gets a value indicating whether anonymous users can access the current Microsoft SharePoint Foundation 2010 site.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Shared ReadOnly Property WebConfigAllowsAnonymous As Boolean
    Get
'Usage
Dim value As Boolean

value = SPSecurity.WebConfigAllowsAnonymous
public static bool WebConfigAllowsAnonymous { get; }

Property Value

Type: System.Boolean
true if anonymous users can access the current Microsoft SharePoint Foundation 2010 site; otherwise, false. The default is true.

Remarks

WebConfigAllowsAnonymous returns false if <deny users="?" /> is in the web.config file.

See Also

Reference

SPSecurity Class

SPSecurity Members

Microsoft.SharePoint Namespace