Initializes a new instance of the
SimpleWorkerRequest class for use in an arbitrary application domain, when the user code creates an
HttpContext (passing the
SimpleWorkerRequest as an argument to the
HttpContext constructor).
Namespace: System.Web.Hosting
Assembly: System.Web (in system.web.dll)

Syntax
Visual Basic (Declaration)
Public Sub New ( _
appVirtualDir As String, _
appPhysicalDir As String, _
page As String, _
query As String, _
output As TextWriter _
)
Dim appVirtualDir As String
Dim appPhysicalDir As String
Dim page As String
Dim query As String
Dim output As TextWriter
Dim instance As New SimpleWorkerRequest(appVirtualDir, appPhysicalDir, page, query, output)
public SimpleWorkerRequest (
string appVirtualDir,
string appPhysicalDir,
string page,
string query,
TextWriter output
)
public:
SimpleWorkerRequest (
String^ appVirtualDir,
String^ appPhysicalDir,
String^ page,
String^ query,
TextWriter^ output
)
public SimpleWorkerRequest (
String appVirtualDir,
String appPhysicalDir,
String page,
String query,
TextWriter output
)
public function SimpleWorkerRequest (
appVirtualDir : String,
appPhysicalDir : String,
page : String,
query : String,
output : TextWriter
)
Parameters
- appVirtualDir
The virtual path to the application directory; for example, "/app".
- appPhysicalDir
The physical path to the application directory; for example, "c:\app".
- page
The virtual path for the request (relative to the application directory).
- query
The text of the query string.
- output
A TextWriter that captures the output from the response.

Exceptions
| Exception type | Condition |
|---|
HttpException |
The appVirtualDir parameter cannot be overridden in this context.
|

.NET Framework Security

Platforms
Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information
.NET Framework
Supported in: 3.0, 2.0, 1.1, 1.0

See Also