Error: Permission Denied

Error Message

When users try to view an HTML Viewer web site, they get this JavaScript error:

Permission Denied


The domain name specified in the browser does not match the domain name in the following lines in the ArcIMSParam.js file:

var imsURL = 'http://true/servlet/com.esri.esrimap.Esrimap?ServiceName=SanFrancisco';

var imsOVURL = 'http://true/servlet/com.esri.esrimap.Esrimap?ServiceName=SanFrancisco';

For example, if a user accesses the web site using, they will get a "Permission Denied" error.

There are three possible solutions.

Solution or Workaround

  • Option 1: The best solution is to use a variable that stores the hostname and uses it in the imsURL and imsOVURL variables. The ArcIMSParam.js file already traps this value; it's stored in a variable called hostName; thus, you can make the following change in the ArcIMSParam.js:

    var imsURL = 'http://' + hostName + '/servlet/com.esri.esrimap.Esrimap?ServiceName=SanFrancisco';

    var imsOVURL = 'http://' + hostName + '/servlet/com.esri.esrimap.Esrimap?ServiceName=SanFrancisco';

    This solution will allow the user to access the site using the hostname, domain or the IP without having to specifically hard code the imsURL and imsOVURL variables.

  • Option 2: Change the lines in the ArcIMSParam.js file to use the IP address. For example:

    To access the site:

    var imsURL = '';

    var imsOVURL = '';

  • Option 3: Use a URL that specifies the hostname rather than the IP address, for example, http://true/website/sanFran.