HttpListenerRequest.RawUrl Proprietà

Definizione

Ottiene le informazioni sull'URL (senza host e porta) richieste dal client.

public:
 property System::String ^ RawUrl { System::String ^ get(); };
public string? RawUrl { get; }
public string RawUrl { get; }
member this.RawUrl : string
Public ReadOnly Property RawUrl As String

Valore della proprietà

Classe String contenente l'URL non elaborato per questa richiesta.

Esempio

Nell'esempio di codice seguente viene illustrato l'uso della RawUrl proprietà .

public static void CheckTestUrl(HttpListener listener, HttpListenerRequest request)
{
    if (request.RawUrl == "/www.contoso.com/test/NoReply")
    {
        listener.Abort ();
        return;
    }
}
Public Shared Sub CheckTestUrl(ByVal listener As HttpListener, ByVal request As HttpListenerRequest)
    If request.RawUrl = "/www.contoso.com/test/NoReply" Then
        listener.Abort()
        Return
    End If
End Sub

Commenti

L'URL non elaborato viene definito come parte dell'URL che segue le informazioni sul dominio. Nella stringa http://www.contoso.com/articles/recent.aspxURL l'URL non elaborato è /articles/recent.aspx. L'URL non elaborato include la stringa di query, se presente.

Per ottenere le informazioni sull'host e sulla porta, usare la RemoteEndPoint proprietà .

Si applica a

Vedi anche