TraceSection.LocalOnly Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menetapkan nilai yang menunjukkan apakah penampil jejak ASP.NET (Trace.axd) hanya tersedia untuk permintaan dari server Web host.
public:
property bool LocalOnly { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("localOnly", DefaultValue=true)]
public bool LocalOnly { get; set; }
[<System.Configuration.ConfigurationProperty("localOnly", DefaultValue=true)>]
member this.LocalOnly : bool with get, set
Public Property LocalOnly As Boolean
Nilai Properti
true
jika penampil jejak ASP.NET (Trace.axd) hanya tersedia untuk permintaan dari server Web host; jika tidak, false
. Defaultnya adalah true
.
- Atribut
Contoh
Contoh kode berikut menunjukkan cara menggunakan LocalOnly properti . Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk TraceSection kelas .
// Get the current LocalOnly property value.
Boolean localOnlyValue = traceSection.LocalOnly;
// Set the LocalOnly property to false.
traceSection.LocalOnly = false;
' Get the current LocalOnly property value.
Dim localOnlyValue As Boolean = traceSection.LocalOnly
' Set the LocalOnly property to false.
traceSection.LocalOnly = False