SPIisWebSite 类
表示一个 Internet Information Services (IIS) 的网站。
继承层次结构
System.Object
Microsoft.SharePoint.Administration.SPMetabaseObject
Microsoft.SharePoint.Administration.SPIisWebSite
命名空间: Microsoft.SharePoint.Administration
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<UpgradableAttribute> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public NotInheritable Class SPIisWebSite _
Inherits SPMetabaseObject
用法
Dim instance As SPIisWebSite
[UpgradableAttribute]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class SPIisWebSite : SPMetabaseObject
备注
使用SPIisWebSite构造函数返回一个 IIS 网站。
示例
下面的示例修改用于 IIS 网站的说明。
Dim uri As New Uri("http://MyServer:999")
Dim webApp As SPWebApplication = SPWebApplication.Lookup(uri)
Dim instID As Integer = webApp.IisSettings(SPUrlZone.Default).PreferredInstanceId
Dim iisWebSite As New SPIisWebSite(instID)
iisWebSite.ServerComment = "MyDescription"
iisWebSite.Update()
Uri uri = new Uri("http://MyServer:999");
SPWebApplication webApp = SPWebApplication.Lookup(uri);
int instID = webApp.IisSettings[SPUrlZone.Default].PreferredInstanceId;
SPIisWebSite iisWebSite = new SPIisWebSite(instID);
iisWebSite.ServerComment = "MyDescription";
iisWebSite.Update();
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。