Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Site Class

Defines a properties and methods common to all Web sites configured in IIS.

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

public sealed class Site : ConfigurationElement

The Site type exposes the following members.

  NameDescription
Public propertyApplicationDefaultsGets the default values for applications that are configured under the current Web site.
Public propertyApplicationsRepresents a collection of applications for the current Web site.
Public propertyAttributesGets a configuration attribute collection that contains the list of attributes for this element. (Inherited from ConfigurationElement.)
Public propertyBindingsGets a collection of IP addresses, TCP ports, and host headers that are associated with the site listener.
Public propertyChildElementsGets all the child elements of the current element. (Inherited from ConfigurationElement.)
Public propertyElementTagNameGets the XML tag name of the current element. (Inherited from ConfigurationElement.)
Public propertyIdGets or sets the unique ID of the site.
Public propertyIsLocallyStoredGets a value indicating whether the configuration element is stored in a particular configuration file. (Inherited from ConfigurationElement.)
Public propertyItemGets or sets an attribute with the specified name. (Inherited from ConfigurationElement.)
Public propertyLimitsGets the connection-related limits for a Web site.
Public propertyLogFileGets a log file that you can use to configure logging for a Web site.
Public propertyMethodsGets a collection of methods for the configuration element. (Inherited from ConfigurationElement.)
Public propertyNameGets or sets the name of the Web site.
Public propertyRawAttributesGets the raw attribute names and values for the current configuration element. (Inherited from ConfigurationElement.)
Public propertySchemaGets the schema for the current element. (Inherited from ConfigurationElement.)
Public propertyServerAutoStartGets or sets a value indicating whether a Web site server should automatically start when Windows is started.
Public propertyStateGets the running state of the Web site.
Public propertyTraceFailedRequestsLoggingGets a SiteTraceFailedRequestsLogging object that configures log settings for failed requests on the current Web site.
Public propertyVirtualDirectoryDefaultsGets the values that all virtual directories created under the current site will use by default if explicit values are not set.
Top

  NameDescription
Public methodDelete (Inherited from ConfigurationElement.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetAttributeReturns a ConfigurationAttribute object that represents the requested attribute. (Inherited from ConfigurationElement.)
Public methodGetAttributeValueReturns the value of the specified attribute. (Inherited from ConfigurationElement.)
Public methodGetChildElement(String)Returns a child element that is under the current configuration element and has the specified name. (Inherited from ConfigurationElement.)
Public methodGetChildElement(String, Type)Returns a child element that is under the current configuration element and has the specified name and type. (Inherited from ConfigurationElement.)
Public methodGetCollection()()()()Returns the default collection for the current configuration element. (Inherited from ConfigurationElement.)
Public methodGetCollection(String)Returns all configuration elements that belong to the current configuration element. (Inherited from ConfigurationElement.)
Public methodGetCollection(Type)Returns the configuration element that has the specified type and is under the current configuration element. (Inherited from ConfigurationElement.)
Public methodGetCollection(String, Type)Returns the configuration element that has the specified name and type and is under the current configuration element. (Inherited from ConfigurationElement.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetMetadataReturns metadata values from the element schema. (Inherited from ConfigurationElement.)
Public methodGetType (Inherited from Object.)
Public methodGetWebConfigurationReturns the configuration values in the Web.config file for the site.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodSetAttributeValueSets the value of the specified attribute. (Inherited from ConfigurationElement.)
Public methodSetMetadataSets metadata values from the element schema. (Inherited from ConfigurationElement.)
Public methodStartStarts the Web site and sets the State property of the Site object to ObjectState..::..Started.
Public methodStopStops the Web site and sets the State property of the Site object to ObjectState..::..Stopped.
Public methodToStringReturns the site name. (Overrides Object..::..ToString()()()().)
Top

A Web site is a container for Web applications and can be accessed through one or more unique bindings. A Web site binding is a combination of an IP address, a port, and the optional host headers. Each Web site must have at least one Web application.

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

ADD
Show:
© 2015 Microsoft