Compartir a través de


Connection.StartConfigurationManagement Método

Definición

Establece la ruta de acceso de configuración del sitio especificado.

Sobrecargas

StartConfigurationManagement(ManagementConfigurationPath)

Establece la ruta de acceso de configuración del sitio especificado.

StartConfigurationManagement(ManagementConfigurationPath, Type)

Establece la ruta de acceso de configuración del sitio especificado, utilizando el tipo de página especificado.

StartConfigurationManagement(ManagementConfigurationPath)

Establece la ruta de acceso de configuración del sitio especificado.

public:
 bool StartConfigurationManagement(Microsoft::Web::Management::Server::ManagementConfigurationPath ^ configurationPath);
public bool StartConfigurationManagement (Microsoft.Web.Management.Server.ManagementConfigurationPath configurationPath);
member this.StartConfigurationManagement : Microsoft.Web.Management.Server.ManagementConfigurationPath -> bool
Public Function StartConfigurationManagement (configurationPath As ManagementConfigurationPath) As Boolean

Parámetros

configurationPath
ManagementConfigurationPath

Objeto ManagementConfigurationPath del sitio que se va a administrar.

Devoluciones

true en todos los casos.

Ejemplos

void doStartConfigMgmt(IServiceProvider sp) {

    Connection con = (Connection)sp.GetService(typeof(Connection));
    try {
        ManagementConfigurationPath newConfigurationPath = ManagementConfigurationPath.CreateSiteConfigurationPath(_tbSite.Text);
        con.StartConfigurationManagement(newConfigurationPath);
    } catch (Exception ex) {
        ShowMessage(ex.ToString(), "Fail: CreateSiteConfigurationPath for  " + _tbSite.Text );
    }

}
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");

}
void doStrtConfgMgntSite(IServiceProvider sp, string siteNm) {

    Connection con = (Connection)sp.GetService(typeof(Connection));

    ManagementConfigurationPath newConfigurationPath = ManagementConfigurationPath
        .CreateSiteConfigurationPath(siteNm);

    bool b = con.StartConfigurationManagement(newConfigurationPath);
    if (b != true)
        ShowMessage("Failure: \n CreateSiteConfigurationPath for site " + siteNm, "Error");

}

void testStrtConfgMgntFile(IServiceProvider sp) {
    doStrtConfgMgntFile(sp, "rws", "/rAp2", "Bin");
}

bool doStrtConfgMgntFile(IServiceProvider sp, string siteNm, string appPath, string filePath) {

    Connection con = (Connection)sp.GetService(typeof(Connection));

    ManagementConfigurationPath newConfigurationPath = ManagementConfigurationPath
        .CreateFileConfigurationPath(siteNm, appPath, filePath);

    bool b = con.StartConfigurationManagement(newConfigurationPath);
    if (b != true)
        ShowMessage("Failure: \n CreateFileConfigurationPath for site " 
            + siteNm, "Error");
    return b;
}

Comentarios

Si esta llamada se realiza correctamente, el método navega a la ruta de acceso de configuración del servidor, sitio, aplicación o carpeta seleccionados. Los configurationPath elementos de cadena de parámetros no distinguen mayúsculas de minúsculas.

Se aplica a

StartConfigurationManagement(ManagementConfigurationPath, Type)

Establece la ruta de acceso de configuración del sitio especificado, utilizando el tipo de página especificado.

public:
 bool StartConfigurationManagement(Microsoft::Web::Management::Server::ManagementConfigurationPath ^ configurationPath, Type ^ pageType);
public bool StartConfigurationManagement (Microsoft.Web.Management.Server.ManagementConfigurationPath configurationPath, Type pageType);
member this.StartConfigurationManagement : Microsoft.Web.Management.Server.ManagementConfigurationPath * Type -> bool
Public Function StartConfigurationManagement (configurationPath As ManagementConfigurationPath, pageType As Type) As Boolean

Parámetros

configurationPath
ManagementConfigurationPath

del ManagementConfigurationPath sitio que se va a administrar.

pageType
Type

Tipo de la página.

Devoluciones

true si la llamada al método se realizó correctamente; de lo contrario, false.

Ejemplos

bool doStartConfigMgmtType(IServiceProvider sp) {

    Connection con = (Connection)sp.GetService(typeof(Connection));
    ManagementConfigurationPath newConfigurationPath =
        ManagementConfigurationPath.CreateSiteConfigurationPath(_tbType.Text);

    IControlPanel controlPanel = (IControlPanel)GetService(typeof(IControlPanel));

    bool b = con.StartConfigurationManagement(newConfigurationPath, controlPanel.ControlPanelPage.PageType);

    if (b != true)
        ShowMessage("CreateSiteConfigurationPath for site " + _tbSite.Text + " failed ", "Error");
    return b;
}

Comentarios

Si esta llamada se realiza correctamente, el método navega a la ruta de acceso de configuración del sitio seleccionado. Los configurationPath elementos parameterstring no distinguen mayúsculas de minúsculas.

Se aplica a