Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the user authentication mode for the SharePoint deployment.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public Shared ReadOnly Property AuthenticationMode As AuthenticationMode
Get
'Usage
Dim value As AuthenticationMode
value = SPSecurity.AuthenticationMode
public static AuthenticationMode AuthenticationMode { get; }
Property Value
Type: System.Web.Configuration.AuthenticationMode
An AuthenticationMode that specifies whether the SharePoint deployment is using Windows, Microsoft ASP.NET 2.0 Forms-based, or custom authentication of users.
Remarks
This value is set with the <authentication> element in the web.config file. But if the calling code is inside a method passed to RunWithElevatedPrivileges, AuthenticationMode returns Windows, regardless of the setting in web.config.
To create a customized authentication system, set the <authentication> element in the web.config file to "None". Then add an authentication module and a membership and role provider.
Important
Microsoft SharePoint Foundation 2010 does not support Windows Live ID authentication.
See Also
Reference
Microsoft.SharePoint Namespace