Hi
We've moved on and we now are encouraged to use VS correctly, with Source Control and local testing before it goes anywhere near a server
Alas, my knowledge of VS in the modern world is lacking. As when I try to browse my site from VS, it goes to a localhot:1234 addresses and the proxy just fails to work at all, I get
"Unable to load /proxy/proxy.ashx?http://<server name>/arcgis/rest/services/LIVEinternal/aerials/MapServer?
f=json&dpi=96&transparent=true&format=png8 status: 500"
With this as more info when I try to go direct to the URL
The request was aborted: Could not create SSL/TLS secure channel.
I've tried various changes to the proxy config, but just can't find the magic combination.
Currently it is
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>ProxyConfig</SPAN> <SPAN class="attr-name token">allowedReferers</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>*<SPAN class="punctuation token">"</SPAN></SPAN>
<SPAN class="attr-name token">mustMatch</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>true<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">></SPAN></SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>serverUrls</SPAN><SPAN class="punctuation token">></SPAN></SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>serverUrl</SPAN> <SPAN class="attr-name token">url</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" target="_blank">http://</A><SPAN><server name</SPAN><SPAN class="punctuation token">></SPAN>/arcgis/<SPAN class="punctuation token">"</SPAN></SPAN>
<SPAN class="attr-name token">username</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>webmap<SPAN class="punctuation token">"</SPAN></SPAN>
<SPAN class="attr-name token">password</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>password<SPAN class="punctuation token">"</SPAN></SPAN>
<SPAN class="attr-name token">matchAll</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>true<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">/></SPAN></SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>serverUrl</SPAN> <SPAN class="attr-name token">url</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F" target="_blank">https://</A><SPAN><server name</SPAN><SPAN class="punctuation token">></SPAN>/arcgis/<SPAN class="punctuation token">"</SPAN></SPAN>
<SPAN class="attr-name token">username</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>webmap<SPAN class="punctuation token">"</SPAN></SPAN>
<SPAN class="attr-name token">password</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>password<SPAN class="punctuation token">"</SPAN></SPAN>
<SPAN class="attr-name token">matchAll</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>true<SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">/></SPAN></SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>serverUrls</SPAN><SPAN class="punctuation token">></SPAN></SPAN>
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>ProxyConfig</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I would ideally like to get shot of the proxy, but the print service fails in IE11 without it 😞
Testing the proxy page with
http://localhost:62146/proxy/proxy.ashx?ping
gives
{ "Proxy Version": "1.1.2", "Configuration File": "OK", "Log File": "Not Exist/Readable"}
So I think that is OK.
Changing the allowedRefeerers to http:\<servername> changes the error from a 500 to a 403
And the full error is
{"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: http://<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>server</SPAN> <SPAN class="attr-name token">name</SPAN><SPAN class="punctuation token">></SPAN></SPAN>/arcgis/rest/services/BaseMapOSNonTiled/MapServer?f=json&dpi=96&transparent=true&format=png8 http://<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>server</SPAN> <SPAN class="attr-name token">name</SPAN><SPAN class="punctuation token">></SPAN></SPAN>/arcgis/rest/services/BaseMapOSNonTiled/MapServer?f=json&dpi=96&transparent=true&format=png8"}}<SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>I also can't get my head around this is in the config
- url: Location of the ArcGIS Server service (or other URL) to proxy. Specify either the specific URL or the root (in which case you should set matchAll="false").
- matchAll="true": When
true all requests that begin with the specified URL are forwarded. Otherwise, the URL requested must match exactly.
To me that is contradictory, the first bullet says you need matchAll to be false where you just have the root, the second bullet seems to contradict that"
Confused!
Cheers
ACM