HostingEnvironment.ApplicationPhysicalPath Özellik

Tanım

Disk üzerindeki fiziksel yolu uygulamanın dizinine alır.

public:
 static property System::String ^ ApplicationPhysicalPath { System::String ^ get(); };
public static string ApplicationPhysicalPath { get; }
static member ApplicationPhysicalPath : string
Public Shared ReadOnly Property ApplicationPhysicalPath As String

Özellik Değeri

Diskte uygulamanın dizinine giden fiziksel yol.

Örnekler

Aşağıdaki kod örneği, uygulamanın App_Data dizininde bir veri dosyasının yolunu oluşturmak için özelliğini kullanır ApplicationPhysicalPath . Örneği çalıştırmak için gereken kodun tamamı için sınıfa genel bakış konusunun VirtualPathProvider Örnek bölümüne bakın.

// Set the datafile path relative to the application's path.
dataFile = HostingEnvironment.ApplicationPhysicalPath + "App_Data\\XMLData.xml";
' Set the datafile path relative to the application's path.
dataFile = HostingEnvironment.ApplicationPhysicalPath & _
  "App_Data\XMLData.xml"

Şunlara uygulanır