SPSecurity.AuthenticationMode 属性

获取 SharePoint 部署的用户身份验证模式。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Shared ReadOnly Property AuthenticationMode As AuthenticationMode
    Get
用法
Dim value As AuthenticationMode

value = SPSecurity.AuthenticationMode
public static AuthenticationMode AuthenticationMode { get; }

属性值

类型:System.Web.Configuration.AuthenticationMode
指定是否在 SharePoint 部署使用 Windows, Microsoft ASP.NET 2.0基于窗体或自定义身份验证的用户AuthenticationMode

备注

web.config文件中,如果使用 <身份验证> 元素设置此值。但如果在传递给RunWithElevatedPrivileges方法调用的代码, AuthenticationMode返回Windows,而不考虑web.config中设置。

若要创建一个自定义身份验证系统,设置为"None" web.config文件中的 <身份验证> 元素。身份验证模块和成员资格和角色提供程序,则添加。

重要信息注释重要信息

Microsoft SharePoint Foundation 2010不支持 Windows Live ID 身份验证。

另请参阅

引用

SPSecurity 类

SPSecurity 成员

Microsoft.SharePoint 命名空间

WebSvcAuthentication

其他资源

SharePoint 2013 中的身份验证、授权和安全性

ASP.NET Authentication