Site 類別

定義

定義 IIS 中設定之所有網站通用的屬性和方法。

public ref class Site sealed : Microsoft::Web::Administration::ConfigurationElement
public sealed class Site : Microsoft.Web.Administration.ConfigurationElement
type Site = class
    inherit ConfigurationElement
Public NotInheritable Class Site
Inherits ConfigurationElement
繼承

備註

網站是 Web 應用程式的容器,可以透過一或多個唯一的系結來存取。 網站系結是 IP 位址、埠和選擇性主機標頭的組合。 每個網站必須至少有一個 Web 應用程式。

屬性

ApplicationDefaults

取得目前網站下所設定之應用程式的預設值。

Applications

表示目前網站的應用程式集合。

Attributes

取得組態屬性集合,其中包含這個專案的屬性清單。

(繼承來源 ConfigurationElement)
Bindings

取得與月臺接聽程式相關聯的 IP 位址、TCP 埠和主機標頭集合。

ChildElements

取得目前專案的所有子專案。

(繼承來源 ConfigurationElement)
ElementTagName

定義 IIS 中設定之所有網站通用的屬性和方法。

(繼承來源 ConfigurationElement)
Id

取得或設定網站的唯一識別碼。

IsLocallyStored

取得值,指出組態專案是否儲存在特定組態檔中。

(繼承來源 ConfigurationElement)
Item[String]

取得或設定具有指定名稱的屬性。

(繼承來源 ConfigurationElement)
Limits

取得網站的連線相關限制。

LogFile

取得可用來設定網站記錄的記錄檔。

Methods

取得組態專案的方法集合。

(繼承來源 ConfigurationElement)
Name

取得或設定網站的名稱。

RawAttributes

定義 IIS 中設定之所有網站通用的屬性和方法。

(繼承來源 ConfigurationElement)
Schema

取得目前專案的架構。

(繼承來源 ConfigurationElement)
ServerAutoStart

取得或設定值,指出當 Windows 啟動時,網站伺服器是否應該自動啟動。

State

取得網站的執行狀態。

TraceFailedRequestsLogging

SiteTraceFailedRequestsLogging取得 物件,這個物件會針對目前網站上的失敗要求設定記錄檔設定。

VirtualDirectoryDefaults

取得未設定明確值時,根據預設,在目前網站下建立的所有虛擬目錄都會使用的值。

方法

Delete()

定義 IIS 中設定之所有網站通用的屬性和方法。

(繼承來源 ConfigurationElement)
GetAttribute(String)

ConfigurationAttribute傳回 物件,表示要求的屬性。

(繼承來源 ConfigurationElement)
GetAttributeValue(String)

傳回指定之屬性的值。

(繼承來源 ConfigurationElement)
GetChildElement(String)

傳回目前組態專案下且具有指定名稱的子專案。

(繼承來源 ConfigurationElement)
GetChildElement(String, Type)

傳回目前組態專案下且具有指定名稱和類型的子專案。

(繼承來源 ConfigurationElement)
GetCollection()

傳回目前組態專案的預設集合。

(繼承來源 ConfigurationElement)
GetCollection(String)

傳回屬於目前組態專案的所有組態專案。

(繼承來源 ConfigurationElement)
GetCollection(String, Type)

傳回具有指定名稱和類型的組態專案,且位於目前的組態專案之下。

(繼承來源 ConfigurationElement)
GetCollection(Type)

傳回具有指定型別且位於目前組態專案底下的組態專案。

(繼承來源 ConfigurationElement)
GetMetadata(String)

從專案架構傳回中繼資料值。

(繼承來源 ConfigurationElement)
GetWebConfiguration()

傳回月臺Web.config檔案中的組態值。

SetAttributeValue(String, Object)

設定指定屬性的值。

(繼承來源 ConfigurationElement)
SetMetadata(String, Object)

設定專案架構中的中繼資料值。

(繼承來源 ConfigurationElement)
Start()

啟動網站,並將 物件的 屬性 Site 設定 StateStarted

Stop()

停止網站,並將 物件的 屬性 Site 設定 StateStopped

ToString()

傳回網站名稱。

適用於