WebApplicationInformation.ApplicationPath Property

 

Gets the application physical path.

Namespace:   System.Web.Management
Assembly:  System.Web (in System.Web.dll)

public string ApplicationPath { get; }

Property Value

Type: System.String

The application physical path.

This property requires appropriate permissions to be accessed. Refer to the Permissions section.

The following code example shows how to obtain the application physical path.

public string GetApplicationPath()
{
    // Get the name of the application  path.
    return (string.Format(
        "Application path: {0}",
        ApplicationInformation.ApplicationPath));
}

.NET Framework
Available since 2.0
Return to top
Show: