ArcGIS pre-requisites not loading on Windows Server 2012?

263
1
05-19-2017 09:04 AM
FaisalMushtaq
New Contributor II

I am using ArcGIS javascript API 4.3 for loading map in my Asp.Net MVC web application.

The map loads fine on my local machine but it does not load when I deploy my build on the server machine which is a Windows Server 2012 machine, the map does not load up and browser console complains something about "require" function not defined. I checked on my peer developer's machine and on that also map loads correctly but on server it still does not load.

I am using following script headers related to ArcGIS core files:

<link rel="stylesheet" href="https://js.arcgis.com/4.3/esri/css/main.css">

<script src="https://js.arcgis.com/4.3/"></script>

I am suspecting it might be an issue of CORS.

Can somebody please guide me what should I do to fix this issue? Please elaborate the solution as I don't know details of CORS much.

0 Kudos
1 Reply
MirHashmi
Occasional Contributor

Hello Faisal,

If you are testing your solution in a browser on the server machine itself check through your network tab in developers tool that it downloaded all scripts successfully.  Generally, due to security policy on server machines it's behavior is different than client machines or in some cases it may be blocking asynchronous calls in the background.  Also as you suspect, it could be the CORS issue.  

Thanks.

0 Kudos