F12 console JavaScript browser errors when browsing to a WIndows 2012 website
-
I have deployed an ASP .NET application with a JavaScript Google Map on the home page to a Windows 2012 website. Now when I browse to the application it comes up fine except the Google Map never loads. One thing that does work is if I publish it as a Web Application and using localhost works. It's just when it's published as a website to IIS is where it fails. As a WebSite on the F12 Console windows debugger here are the errors I'm getting: SEC7120: Origin http://mymachinename not found in Access-Control-Allow-Origin header. SCRIPTING7002: XMLHttpRequest: Network error 0X80700013, Could not complete operation due to error 80700013. getPreferences failed when constructing GPToolsService: undefined
var map; MoW.ready(function () { map = new MoW.Map({ target: 'MoWmap' }); }); window.onload = function () { MoW.ready(function () { if (document.getElementById('<%= KMLOPString.ClientID %>').value !== "") { var overlayPropertiesOP = { "name": "Openations KML", "url": document.getElementById('<%= KMLOPString.ClientID %>').value, "type": MoW.protocols.KMLProtocol.TYPE.STRING, "description": "Demonstrating KML overlay", "mapTypeId": "google.map.mapTypeId.ROADMAP" }; var newOverlayObjectOP = MoW.Factory.createKMLOverlay(overlayPropertiesOP); map.addOverlay(newOverlayObjectOP, { showAlert: true }); // map.setBasemap(MoW.Basemap.ID.ROADMAP); } if (document.getElementById('<%= KMLESString.ClientID %>').value !== "") { var overlayPropertiesES = { "name": "Exercises KML", "url": document.getElementById('<%= KMLESString.ClientID %>').value, "type": MoW.protocols.KMLProtocol.TYPE.STRING, "description": "Demonstrating KML overlay", "mapTypeId": "google.map.mapTypeId.ROADMAP" }; var newOverlayObjectES = MoW.Factory.createKMLOverlay(overlayPropertiesES); map.addOverlay(newOverlayObjectES, { showAlert: true
</x-turndown>
-
I have deployed an ASP .NET application with a JavaScript Google Map on the home page to a Windows 2012 website. Now when I browse to the application it comes up fine except the Google Map never loads. One thing that does work is if I publish it as a Web Application and using localhost works. It's just when it's published as a website to IIS is where it fails. As a WebSite on the F12 Console windows debugger here are the errors I'm getting: SEC7120: Origin http://mymachinename not found in Access-Control-Allow-Origin header. SCRIPTING7002: XMLHttpRequest: Network error 0X80700013, Could not complete operation due to error 80700013. getPreferences failed when constructing GPToolsService: undefined
var map; MoW.ready(function () { map = new MoW.Map({ target: 'MoWmap' }); }); window.onload = function () { MoW.ready(function () { if (document.getElementById('<%= KMLOPString.ClientID %>').value !== "") { var overlayPropertiesOP = { "name": "Openations KML", "url": document.getElementById('<%= KMLOPString.ClientID %>').value, "type": MoW.protocols.KMLProtocol.TYPE.STRING, "description": "Demonstrating KML overlay", "mapTypeId": "google.map.mapTypeId.ROADMAP" }; var newOverlayObjectOP = MoW.Factory.createKMLOverlay(overlayPropertiesOP); map.addOverlay(newOverlayObjectOP, { showAlert: true }); // map.setBasemap(MoW.Basemap.ID.ROADMAP); } if (document.getElementById('<%= KMLESString.ClientID %>').value !== "") { var overlayPropertiesES = { "name": "Exercises KML", "url": document.getElementById('<%= KMLESString.ClientID %>').value, "type": MoW.protocols.KMLProtocol.TYPE.STRING, "description": "Demonstrating KML overlay", "mapTypeId": "google.map.mapTypeId.ROADMAP" }; var newOverlayObjectES = MoW.Factory.createKMLOverlay(overlayPropertiesES); map.addOverlay(newOverlayObjectES, { showAlert: true
</x-turndown>
One thing that does work is if I publish it as a Web Application and using localhost works. It's just when it's published as a website to IIS is where it fails