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.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 200.0 - 200.5 |
.NET | 200.0 - 200.5 |
.NET Windows | 200.0 - 200.5 |
.NET Android | 200.3 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 200.0 - 200.5 |
UWP | 200.0 - 200.5 |