Authentication error with .Net resource proxy

12-27-2019 01:01 AM
Occasional Contributor


We have an application which is built using Web App Builder and it uses the ESRI resource proxy (.Net latest version 1.1.2) to access ArcGIS Online and other URL's accessible on internet.

The proxy application has been setup in IIS with anonymous authentication. 

Pinged the proxy and it worked fine.


Initially, I tried accessing ArcGIS Online URL via the proxy without making any changes in proxy config or application: https://[server]/[proxyname]/proxy.ashx?

Got the following error.

{"error": {"code": 403,"message":"Proxy has not been set up for this URL. Make sure there is a serverUrl in the configuration file that matches:"}}

This means that the error message was coming from proxy application only as it mentioned “serverUrl” parameter. Now by default the following rule is already present in the default version of proxy.config


<serverUrl url=""



Still the above error message for “ServerUrl” came. So I added another “ServerUrl” as given below.


<serverUrl url=""



I didn’t mention any user or password or domain. Now I got the following error while trying to access AGOL URL via proxy.


{"error": {"code": 500,"message":"Unable to connect to the remote server"}}


This suggests that proxy application is unable to access internet. So now I changed the following line in proxy.ashx to use our organization proxy.


private static System.Net.IWebProxy SYSTEM_PROXY = new WebProxy("[Our organization proxy PAC file]",true); //System.Net.HttpWebRequest.DefaultWebProxy; // Use the default system proxy

After I did this change the AGOL URL was accessible via proxy.

However after some time when I tried to access same URL: 


Getting this error (In Chrome)

This site can’t be reached

The webpage at https://[server]/[proxyname]/proxy.ashx? might be temporarily down or it may have moved permanently to a new web address.

Error in IE

You must be authenticated by a proxy before the Web server can process your request.

Why is this happening?

Operating System is Windows Server 2016.

IIS version is 10.

ArcGIS Server, Portal for ArcGIS version is 10.7.1.



0 Kudos
1 Reply
Esri Regular Contributor

Cross-posting this to ArcGIS API for JavaScript‌ and Developer Communities‌.

0 Kudos