Proxy.ashx problem

6815
3
03-11-2014 05:22 AM
manvinderkandhari
New Contributor
I downloaded source from  http://github.com/Esri/resource-proxy   for .net. My proxy.config is simple
<ProxyConfig   mustMatch="false">
    <serverUrls>
     
      <serverUrl url="http://services.arcgisonline.com"     matchAll="true"  />
      <serverUrl url="http://server.arcgisonline.com"     matchAll="true"  />
    
    </serverUrls>
</ProxyConfig>

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 Found - http://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
0 Kudos
3 Replies
JesseAdams
New Contributor III
Did you find a resolution to this issue?  I'm experiencing the same issue when trying to run a localhost proxy to a remote ArcGIS Server.  If I put the same configuration on one of our servers to works without an issue.  Would be great if development on localhost would work the same way.
0 Kudos
BjornSvensson
Esri Regular Contributor
The proxy isn't intended to re-write the content of the proxied request to update relative links to css or images.

While this does make it a bit ugly in your screenshot (when testing it in the browser), do you have a problem when using the proxy in your application?  If so, could you tell us more about how you are using the proxy?

Thanks 🙂
0 Kudos
BjornSvensson
Esri Regular Contributor
I'm experiencing the same issue when trying to run a localhost proxy to a remote ArcGIS Server.  If I put the same configuration on one of our servers to works without an issue.  Would be great if development on localhost would work the same way.


Jesse, I'm not sure I understand.  Are you saying the proxy works different on one machine than another? Or that it behaves differently when proxying one server than another?
0 Kudos