Hello everyone,
I have an application which is running fine when I use it from my localhost. When I move it to a development server it does not work. The only change I am making with the file when I move it to the dev server is this one line:
esriConfig.defaults.io.proxyUrl = "http://localhost/proxy/proxy.ashx";
esriConfig.defaults.io.proxyUrl = "http://ipcds0001/proxy/proxy.ashx";
ipcds0001 is the name of the dev server. I'm not certain if I am referencing the location of proxy.ashx correctly? Nor am I certain that I've done everything correctly in setting the proxy up correctly on the dev server. I used to have a bookmark to a good file on the esri site which showed all things that needed to be done in configuring the proxy, but that bookmark is not working anymore.
The dev server is Windows 2012 R2. I have copied the proxy folder into C:\inetpub\wwwroot\ and converted the proxy folder into an application pool.
When I try to access the file on the dev server from my pc, I get the attached error message in the console (console.png).
Any suggestions in troubleshooting this problem, greatly appreciated.
Chris
Solved! Go to Solution.
I found the following link which outlines IIS components which need to be installed:
Installing ArcGIS Server for the Microsoft .NET Framework
Not all components were installed on my dev server. Things seem to be working so far.
Thanks everyone.
Chris,
I have copied the proxy folder into C:\inetpub\wwwroot\ and converted the proxy folder into an application pool.
Do you mean you converted the proxy folder to an application (by right clicking the folder and choosing "Convert to Application")?
Have you tested the proxy? There are instructions on how to test the proxy in the readme for the dotNet proxy:
resource-proxy/README.md at master · Esri/resource-proxy · GitHub
I have tested the directions widget sample on both localhost and dev server. It works on localhost but not on dev server. So there's something that I've not done or forgotten with the dev server.
I am using this code on localhost:
//all requests to route.arcgis.com will proxy to the proxyUrl defined in this object.
urlUtils.addProxyRule({
urlPrefix: "route.arcgis.com",
proxyUrl: "/proxy/proxy.ashx"
});
When I try the same on the dev server I get the following in the console (see attached picture)
Thanks
Could it be that you need to include the domain in your url for the proxy? Such as ipcds0001.xxx.local?
Thanks Daniel. I changed the proxyurl to http://ipcds0001.coc.ca/proxy/proxy.ashx and I still get the same issues. I'm still wondering if there's some IIS setting that needs changing given that that is the location of the proxy.ashx and the browser keeps returning a 404 error??
I am also wondering, I'm sure when I originally set up the proxy on my localhost (months ago) that there were some IIS settings that I needed to modify. I can't recall, nor did I print out the documentation I found at the time. So if there are IIS settings to modify that someone could point out to me that would also be a great help.
Thanks everyone
When I've set these up, I've had to use a path like "http://oursite.mo.gov", not the server name.
Thanks for the reply Tracy. The result so far seems to be the same whether I use http://ipcds0001/directionswidget/index2.html or http://ipcds0001.coc.ca/directionswidget/index2.html
The result in the console is the same:
I'm thinking there's something on the dev server (ipcds0001) IIS that's preventing the browser getting at the proxy.ashx file.
Thanks again.
I found the following link which outlines IIS components which need to be installed:
Installing ArcGIS Server for the Microsoft .NET Framework
Not all components were installed on my dev server. Things seem to be working so far.
Thanks everyone.