Show / Hide Table of Contents

Method UseDefaultReferer

UseDefaultReferer(IArcGISHttpConfiguration, Uri)

Sets the default referer used by default for all requests going through ArcGISHttpMessageHandler.

Declaration
public static IArcGISHttpConfiguration UseDefaultReferer(this IArcGISHttpConfiguration configuration, Uri defaultReferer)
Parameters
Type Name Description
IArcGISHttpConfiguration configuration

HTTP Configuration

System.Uri defaultReferer

The default referer.

Returns
Type Description
IArcGISHttpConfiguration

HTTP Configuration

Remarks

A referer is text in the Http header that is passed between web requests of the client application and web server.

In many scenarios, the referer is used to provide the web server how the incoming web request was initiated. For example a user clicked a particular hyperlink on a web page and the referer gets populated with that hyperlink. The referer is often the URL of the previous web page from which a link was followed. Some companies use referer information to find out user internet browsing patterns for their internet site. Setting referer information in the Http header of a web request is many times required by secured web sites so they can ensure that only approved users are using their resources.

IMPORTANT
Setting a string value for the DefaultReferer Property to the correct referer is necessary in order to gain access to ArcGIS Server web services that require long term tokens for authentication. ArcGIS Online and ArcGIS Portal require long term token for web services that are secured. Depending on the development platform, specifying the correct string for the AuthenticationManager.TokenGeneration Property can be imperative to accessing secured services by the AuthenticationManager.

See Also
Referer

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.0 - 200.8
.NET200.0 - 200.8
.NET Windows200.0 - 200.8
.NET Android200.3 - 200.8
.NET iOS200.0 - 200.8
.NET Framework200.0 - 200.8
UWP200.0 - 200.8
In This Article
Back to top Copyright © 2022 Esri.