XML Parsing Error: no element found Location: http://servername/proxy.ashx?http://Server.Name.com/ArcGIS/rest/services/cadaster/ServiceName/MapServer Line Number 1, Column 1:
<script type="text/javascript"> dojo.require("esri.map"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.BorderContainer"); var map; function Init() { esri.config.defaults.io.proxyUrl = "../proxy.ashx"; dojo.style(dojo.byId("map"), { width: dojo.contentBox("map").w + "px", height: (esri.documentBox.h - dojo.contentBox("navTable").h - 40) + "px" }); map = new esri.Map("map"); var CountyDataLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name2.com/ArcGIS/rest/services/Counties/MapServer"); map.addLayer(CountyDataLayer); var RestrictedLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name2.com/ArcGIS/rest/services/cadaster/ServiceName/MapServer?token=ZwBeUJKkl5L6bSitvEGgRy7hy52NmqBF8GIFCnB-7Lg."); map.addLayer(RestrictedLayer); var resizeTimer; dojo.connect(map, 'onLoad', function(theMap) { dojo.connect(dijit.byId('map'), 'resize', function() { clearTimeout(resizeTimer); resizeTimer = setTimeout(function() { map.resize(); map.reposition(); }, 500); }); }); } dojo.addOnLoad(Init); </script>
<?xml version="1.0" encoding="utf-8" ?> <ProxyConfig mustMatch="true"> <serverUrls> <serverUrl url="http://Server.Name2.com/ArcGIS/rest/services/cadaster/ServiceName/MapServer" matchAll="true" token="ZwBeUJKkl5L6bSitvEGgRy7hy52NmqBF8GIFCnB-7Lg."></serverUrl> </serverUrls> </ProxyConfig>
esri.config.defaults.io.proxyUrl = "../proxy.ashx";
Change the URL to a complete server URL : http://servername/proxy.ashx<serverUrl url="http://Server.Name2.com/ArcGIS/rest/services/cadaster/ServiceName/MapServer" </serverUrls>
Change the URL above to http://ServerName/ArcGIS/rest
<script type="text/javascript"> dojo.require("esri.map"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.layout.BorderContainer"); var map; function Init() { esri.config.defaults.io.proxyUrl = "http://gisweb/proxy.ashx"; dojo.style(dojo.byId("map"), { width: dojo.contentBox("map").w + "px", height: (esri.documentBox.h - dojo.contentBox("navTable").h - 40) + "px" }); map = new esri.Map("map"); var CountyDataLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name2.com/ArcGIS/rest/services/Counties/MapServer"); map.addLayer(CountyDataLayer); var RestrictedLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://Server.Name2.com/ArcGIS/rest/services/cadaster/AboriginalUseArea/MapServer"); map.addLayer(RestrictedLayer); } dojo.addOnLoad(Init); </script>
<?xml version="1.0" encoding="utf-8" ?> <ProxyConfig mustMatch="true"> <serverUrls> <serverUrl url="http://Server.Name2.com/ArcGIS/rest/" matchAll="true" host="10.10.10.51" token="ZwBeUJKkl5L6bSitvEGgRzZquMaWltg0GZY_xbGzVIA."></serverUrl> <serverUrl url="http://www.google.com" matchAll="true"></serverUrl> </serverUrls> </ProxyConfig>
Hello,
When you go to
http://Server.Name/ArcGIS/tokens/gettoken.html
And you get the screen like the attached, do you create the token using the ip address of Server.Name?
Secure connection (SSL) required.