Application 類別

定義

定義 Internet Information Services (IIS) 中所有應用程式通用的屬性。

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

範例

下列範例會建立 Web 應用程式。

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Administration;
using Microsoft.Web.Management;

namespace AdministrationSnippets
{
    public class AdministrationApplication
    {
        // Creates an application under the default Web site.
        public void CreateApplication()
        {
            ServerManager manager = new ServerManager();
            Site defaultSite = manager.Sites["Default Web Site"];
            defaultSite.Applications.Add(
                "/blogs", @"C:\inetpub\wwwroot\blogs");
            manager.CommitChanges();
        }
    }
}

備註

應用程式是 IIS 網站中內容的群組。 應用程式是由該路徑中內容的特定內容和屬性的實體路徑所指定。

屬性

ApplicationPoolName

取得或設定應用程式指派給的應用程式集區名稱。

Attributes

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

(繼承來源 ConfigurationElement)
ChildElements

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

(繼承來源 ConfigurationElement)
ElementTagName

定義 Internet Information Services (IIS) 中所有應用程式通用的屬性。

(繼承來源 ConfigurationElement)
EnabledProtocols

取得或設定為應用程式啟用的通訊協定。

IsLocallyStored

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

(繼承來源 ConfigurationElement)
Item[String]

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

(繼承來源 ConfigurationElement)
Methods

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

(繼承來源 ConfigurationElement)
Path

取得或設定與應用程式相關聯的相對。

RawAttributes

定義 Internet Information Services (IIS) 中所有應用程式通用的屬性。

(繼承來源 ConfigurationElement)
Schema

取得目前專案的架構。

(繼承來源 ConfigurationElement)
VirtualDirectories

取得應用程式的虛擬目錄集合。

VirtualDirectoryDefaults

取得指派給應用程式所有虛擬目錄的預設值。

方法

Delete()

定義 Internet Information Services (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()

Configuration 回目前網站和應用程式路徑的 物件。

SetAttributeValue(String, Object)

設定指定屬性的值。

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

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

(繼承來源 ConfigurationElement)
ToString()

傳回字串,此字串是網站名稱和路徑的組合。

適用於