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
I've tried various changes to the proxy config, but just can't find the magic combination.
Currently it is
<ProxyConfig allowedReferers="*"
mustMatch="true">
<serverUrls>
<serverUrl url="http://<server name>/arcgis/"
username="webmap"
password="password"
matchAll="true"/>
<serverUrl url="https://<server name>/arcgis/"
username="webmap"
password="password"
matchAll="true"/>
</serverUrls>
</ProxyConfig>
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://<server name>/arcgis/rest/services/BaseMapOSNonTiled/MapServer?f=json&dpi=96&transparent=true&format=png8 http://<server name>/arcgis/rest/services/BaseMapOSNonTiled/MapServer?f=json&dpi=96&transparent=true&format=png8"}}
I also can't get my head around this is in the config
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
More info, changing the Proxy config from
<serverUrl url="http://server name"
To
<serverUrl url="http://server name/arcgis/rest/services/LIVEinternal/aerials/MapServer"
moves the error from a 403 to the
erorr - which to me looks like something is missing in the way I am testing the site in VS
Edit #2
Sorted it (I think) it wasn't happy I had a user name and password in the config (these services don't need them) - I may still have an issue when I come to services that DO need them. Odd.
Hey Adrian,
I have the same issue, have you got it fixed?
Cheers,
Chen
Yes - as I said - it didn't seem to like me having user credentials in the proxy config - luckilly I don't need them at the moment, taking them out made everything work