Freigeben über


HttpRequest.PhysicalApplicationPath-Eigenschaft

Ruft den physikalischen Dateisystempfad für das Stammverzeichnis der gegenwärtig ausgeführten Serveranwendung ab.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

Syntax

'Declaration
Public ReadOnly Property PhysicalApplicationPath As String
'Usage
Dim instance As HttpRequest
Dim value As String

value = instance.PhysicalApplicationPath
public string PhysicalApplicationPath { get; }
public:
property String^ PhysicalApplicationPath {
    String^ get ();
}
/** @property */
public String get_PhysicalApplicationPath ()
public function get PhysicalApplicationPath () : String

Eigenschaftenwert

Der Dateisystempfad für das Stammverzeichnis der aktuellen Anwendung.

Beispiel

Im folgenden Codebeispiel wird die HtmlEncode-Methode für das Codieren des Werts der PhysicalApplicationPath-Eigenschaft im HTML-Format verwendet und die WriteLine-Methode für das Schreiben des codierten Werts in die Datei. Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels für die HttpRequest-Klasse.

' Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath))
sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath))
sw.WriteLine(Server.HtmlEncode(Request.RawUrl))
// Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.PhysicalApplicationPath));
sw.WriteLine(Server.HtmlEncode(Request.PhysicalPath));
sw.WriteLine(Server.HtmlEncode(Request.RawUrl));

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

HttpRequest-Klasse
HttpRequest-Member
System.Web-Namespace