Export (0) Print
Expand All

SPIisWebSite Class

Windows SharePoint Services 3

Represents an Internet Information Services (IIS) Web site.


Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class SPIisWebSite : SPMetabaseObject

This object inherits from the IIS SPMetabaseObject object, which is abstract and therefore cannot be instantiated. 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";

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

© 2014 Microsoft