WebContext 생성자

정의

WebContext 클래스의 새 인스턴스를 초기화합니다.

public:
 WebContext(System::Web::Configuration::WebApplicationLevel pathLevel, System::String ^ site, System::String ^ applicationPath, System::String ^ path, System::String ^ locationSubPath, System::String ^ appConfigPath);
public WebContext (System.Web.Configuration.WebApplicationLevel pathLevel, string site, string applicationPath, string path, string locationSubPath, string appConfigPath);
new System.Web.Configuration.WebContext : System.Web.Configuration.WebApplicationLevel * string * string * string * string * string -> System.Web.Configuration.WebContext
Public Sub New (pathLevel As WebApplicationLevel, site As String, applicationPath As String, path As String, locationSubPath As String, appConfigPath As String)

매개 변수

pathLevel
WebApplicationLevel

WebApplicationLevel 개체입니다.

site
String

웹 사이트 이름입니다.

applicationPath
String

현재 웹 애플리케이션 루트 수준의 가상 경로입니다.

path
String

현재 구성 개체에 나타나는 Web.config 파일의 가상 경로입니다.

locationSubPath
String

현재 편집되고 있는 location 요소의 경로 값입니다.

appConfigPath
String

현재 웹 애플리케이션의 구성 경로입니다.

예제

다음 예제에서는 이 생성자를 사용하는 방법을 보여 줍니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 WebContext 클래스입니다.

// Get the context.
WebContext webContext = (WebContext)config.EvaluationContext.HostingContext;
' Get the context.
Dim webContext As WebContext = config.EvaluationContext.HostingContext

적용 대상