Export (0) Print
Expand All

HttpListenerRequest::UrlReferrer Property

Gets the Uniform Resource Identifier (URI) of the resource that referred the client to the server.

Namespace:  System.Net
Assembly:  System (in System.dll)

public:
property Uri^ UrlReferrer {
	Uri^ get ();
}

Property Value

Type: System::Uri
A Uri object that contains the text of the request's Referer header, or nullptr if the header was not included in the request.

If a client has followed a hyperlink to the requested URI, its request might contain a Referrer header that identifies the URI of the resource that contained the hyperlink.

Clients can falsify or choose not to present a Referer header. Therefore, while the UrlReferrer property can be useful for identifying basic trends in Web traffic; you should not use it as part of an authorization scheme to control access to data.

For a complete list of request headers, see the HttpRequestHeader enumeration.

The UrlReferrer is null when there is no Referrer header in the request or when the Referrer header is present in the request but does not parse to a valid Uri.

The following code example demonstrates using this property.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft