ManagementConfigurationPath.CreateApplicationConfigurationPath 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立新的應用程式組態路徑。
多載
| CreateApplicationConfigurationPath(String) |
建立新的應用程式組態路徑。 |
| CreateApplicationConfigurationPath(String, String) |
使用指定的網站名稱建立新的應用程式組態路徑。 |
CreateApplicationConfigurationPath(String)
建立新的應用程式組態路徑。
public:
static Microsoft::Web::Management::Server::ManagementConfigurationPath ^ CreateApplicationConfigurationPath(System::String ^ applicationPath);
public static Microsoft.Web.Management.Server.ManagementConfigurationPath CreateApplicationConfigurationPath (string applicationPath);
static member CreateApplicationConfigurationPath : string -> Microsoft.Web.Management.Server.ManagementConfigurationPath
Public Shared Function CreateApplicationConfigurationPath (applicationPath As String) As ManagementConfigurationPath
參數
- applicationPath
- String
應用程式路徑。
傳回
ManagementConfigurationPath 物件。
範例
下列範例會建立新的 ManagementConfigurationPath 物件。
void doStrtConfgMgntApp(IServiceProvider sp, string appPath) {
Connection con = (Connection)sp.GetService(typeof(Connection));
ManagementConfigurationPath newConfigurationPath = ManagementConfigurationPath
.CreateApplicationConfigurationPath(appPath);
bool b = con.StartConfigurationManagement(newConfigurationPath);
if (b != true)
ShowMessage("Failure: \n CreateApplicationConfigurationPath for App Path"
+ appPath, "Error");
}
適用於
CreateApplicationConfigurationPath(String, String)
使用指定的網站名稱建立新的應用程式組態路徑。
public:
static Microsoft::Web::Management::Server::ManagementConfigurationPath ^ CreateApplicationConfigurationPath(System::String ^ siteName, System::String ^ applicationPath);
public static Microsoft.Web.Management.Server.ManagementConfigurationPath CreateApplicationConfigurationPath (string siteName, string applicationPath);
static member CreateApplicationConfigurationPath : string * string -> Microsoft.Web.Management.Server.ManagementConfigurationPath
Public Shared Function CreateApplicationConfigurationPath (siteName As String, applicationPath As String) As ManagementConfigurationPath
參數
- siteName
- String
網站的名稱。
- applicationPath
- String
應用程式路徑。
傳回
ManagementConfigurationPath 物件。
範例
下列範例會建立新的 ManagementConfigurationPath 物件。
void doStrtConfgMgntApp(IServiceProvider sp, string siteNm, string appPath) {
Connection con = (Connection)sp.GetService(typeof(Connection));
ManagementConfigurationPath newConfigurationPath = ManagementConfigurationPath
.CreateApplicationConfigurationPath(siteNm, appPath);
bool b = con.StartConfigurationManagement(newConfigurationPath);
if (b != true)
ShowMessage("Failure: \n CreateApplicationConfigurationPath for site "
+ siteNm + " App Path" + appPath, "Error");
}