我正在尝试使用代理arcgis.My proxy.config是
<?xml version="1.0" encoding="utf-8" ?>
<ProxyConfig allowedReferers="*" mustMatch="false">
<serverUrls>
<serverUrl url="http://myownservice.com.tr" matchAll="false"/>
<serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services" matchAll="false"/>
</serverUrls>
</ProxyConfig>
和我的js代码:
urlUtils.addProxyRule({
urlPrefix: "http://services.arcgisonline.com/ArcGIS/rest/services",
proxyUrl: "http://localhost/Dotnet/proxy.ashx"
});
urlUtils.addProxyRule({
urlPrefix: "http://myownservice.com.tr",
proxyUrl: "http://localhost/Dotnet/proxy.ashx"
});
当我执行项目服务时.arcgis很好地获得代理。 就像这样:
http://localhost/Dotnet/proxy.ashx?http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tilemap/12/1528/2376/8/8
但我自己的服务不接受代理。
http://myownservice.com.tr:6080/arcgis/rest/info?f=json