SPVirtualServerConfig.SelfServiceSiteCreationEnabled 属性
请注意:此 API 现在已过时。
获取或设置一个布尔值,指定是否在虚拟服务器上启用自助式网站创建。
命名空间: Microsoft.SharePoint.Administration
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.", _
False)> _
Public Property SelfServiceSiteCreationEnabled As Boolean
Get
Set
用法
Dim instance As SPVirtualServerConfig
Dim value As Boolean
value = instance.SelfServiceSiteCreationEnabled
instance.SelfServiceSiteCreationEnabled = value
[ObsoleteAttribute("Use SPWebApplication or SPIisSettings instead.",
false)]
public bool SelfServiceSiteCreationEnabled { get; set; }
属性值
类型:System.Boolean
true如果启用自助式网站创建。
示例
下面的代码示例在指定的虚拟服务器启用自助式网站创建。
Dim globalAdmin As New SPGlobalAdmin()
Dim uri As New System.Uri("http://Server_Name")
Dim vServer As SPVirtualServer = globalAdmin.OpenVirtualServer(uri)
Dim vConfig As SPVirtualServerConfig = vServer.Config
vConfig.SelfServiceSiteCreationEnabled = True
vConfig.Properties.Update()
globalAdmin.Close()
SPGlobalAdmin globalAdmin = new SPGlobalAdmin();
System.Uri uri = new System.Uri("http://Server_Name");
SPVirtualServer vServer = globalAdmin.OpenVirtualServer(uri);
SPVirtualServerConfig vConfig = vServer.Config;
vConfig.SelfServiceSiteCreationEnabled = true;
vConfig.Properties.Update();
globalAdmin.Close();