Frage

I downloaded source from http://github.com/Esri/resource-proxy for .net. My proxy.config is simple

Problem i am having is when i test my proxy ,it retrieves the info/data from the given URL but path for all .css ,image files is relative to my local machine. My request looks like : "http://local.XYZ.com/wewportal/proxy.ashx?http://server.arcgisonline.com" error i see in Firebug :"NetworkError: 404 Not Foundhttp://local.xyz.com/arcgis/rest/static/main.css"

my website is in MVC4 and proxy.ashx,proxy.config are in the root directory.Am i missing some setting on IIS ?

Thanks Manvi

War es hilfreich?

Lösung

From what it looks like, your attributes are incorrectly formatted. Usually it's something like : http://www.example.com?variable_name=value&variable_second=value_second . I don't see any variable names in your url, just values -so something's up with that.

Edit: Okay, I got it working on my machine and yes, your attributes are missing an "=" sign. I opened up the readme and the direction state:

*Test that the proxy is able to forward requests directly in the browser using: http://[yourmachine]/DotNet/proxy.ashx?http://services.arcgisonline.com/ArcGIS/rest/services/?f=pjson * Edit the proxy.config file in a text editor to set up your proxy configuration settings. * Update your application to use the proxy for the specified services. In this JavaScript example requests to route.arcgis.com will utilize the proxy.

Because I put the files in the root directory for a test (and not in the DotNet folder) , I shortened the url. the working URL for me was: http://localhost:64875/proxy.ashx?http://services.arcgisonline.com/ArcGIS/rest/services/?f=pjson

^^ note the ending has an "=" sign. depending on where your proxy.ashx file is you might need to use a different location.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top