Problems using proxy with WAB

946
3
11-19-2017 11:39 PM
RichardButgereit
Occasional Contributor

Have followed the tutorials and troubleshooting within the forum, and can't figure it out.

Scenario is .NET proxy on http-only host. 

http:// myserver.com/proxy/proxy.ashx?ping

  • { "Proxy Version": "1.1.2", "Configuration File": "OK", "Log File": "Not Exist/Readable"}

http:// myserver.com/proxy/proxy.ashx?https://services1.arcgis.com/xxxxxxxxxx/arcgis/rest/services/xxxxxxxxxx/FeatureServer/0?f=pjson&toke...

  • displays JSON just fine

http:// myserver.com/proxy/proxy.ashx?http://xxxxxx.maps.arcgis.com

  • displays a blank white screen 

http:// myserver.com/proxy/proxy.ashx?http:// myserver.com/wab

  • displays a blank white screen 

Proxy.config --

<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*"
         mustMatch="true">
<serverUrls>
<serverUrl url="http://services.arcgisonline.com"
      matchAll="true"/>
<serverUrl url="http://services1.arcgisonline.com"
      matchAll="true"/>
<serverUrl url="https://xxxxxx.maps.arcgis.com"
      clientId="xxxxxxxxxxx"
      clientSecret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
matchAll="true"/>
</serverUrls>
</ProxyConfig>

Ultimate goal is to have .NET ASP web application hosted on myserver.com from which authenticated users click links to open web application building mapping app -- which can be hosted in ArcGIS Online or locally on same server. 

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Richard,

http ://myserver.com/proxy/proxy.ashx?http://xxxxxx.maps.arcgis.com

http ://myserver.com/proxy/proxy.ashx?http://myserver.com/wab

These should produce a blank pages.

An appropriate test would be:

http ://myserver.com/proxy/proxy.ashx?http://myserver.com/wab/SOME_SPECIFIC_FILE

0 Kudos
RichardButgereit
Occasional Contributor

This also returns a blank page --

http:// myserver.com/proxy/proxy.ashx?http://xxxxxx.maps.arcgis.com/apps/webappviewer/index.html?id=xxxxxxxxxxxxxxxxxxxx

I had shortened the URL. 

Let me re-state the desired scenario -- as maybe I have a misunderstanding...

I want users to login in to our .NET ASP application. They will use that application to perform searches, display results, and then click links to open a secured web app (which may be hosted in our AGO or deployed on the same server hosting the .NET ASP) with a secured map service without being challenged again to authenticate to AGO.

What am I missing?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Richard,

   I think what you are missing is just a proper understanding of the workflow you need. So if you have ASP.Net app that has authentication then access to that web app directory is secured by ASP.Net. The way that this would tie in with WAB, secured services and your proxy is that WAB would be setup to use the proxy and in the proxy.config you would provide the credential (username and password) that would allow the WAB app you use the secured service without prompting for login. So the WAB app that uses the proxy will have access determined by the ASP.Net authentication. I hope this explains things.

0 Kudos