This topic has not yet been rated - Rate this topic

SPIisWebSite Class

Represents an Internet Information Services (IIS) Web site.

System.Object
  Microsoft.SharePoint.Administration.SPMetabaseObject
    Microsoft.SharePoint.Administration.SPIisWebSite

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[UpgradableAttribute]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPIisWebSite : SPMetabaseObject

Use the SPIisWebSite constructor to return an IIS Web site.

The following example modifies the description that is used for an IIS Web site.

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();
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ