HttpListener.Realm Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the realm, or resource partition, associated with this HttpListener object.
public:
property System::String ^ Realm { System::String ^ get(); void set(System::String ^ value); };
public string? Realm { get; set; }
public string Realm { get; set; }
member this.Realm : string with get, set
Public Property Realm As String
Property Value
A String value that contains the name of the realm associated with the HttpListener object.
Exceptions
This object has been closed.
Examples
The following code example demonstrates setting the Realm property.
public static void ConfigureListener1(HttpListener listener)
{
// Specify an authentication realm.
listener.Realm = "ExampleRealm";
}
Public Shared Sub ConfigureListener1(ByVal listener As HttpListener)
' Specify an authentication realm.
listener.Realm = "ExampleRealm"
End Sub
Remarks
Servers use realms to partition protected resources; each partition can have its own authentication scheme and/or authorization database. Realms are used only for basic and digest authentication. After a client successfully authenticates, the authentication is valid for all resources in a given realm. For a detailed description of realms, see RFC 2617 at https://www.ietf.org/.
An instance of HttpListener has only one associated realm.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기