ERROR

Permission Denied

Last Published: April 25, 2020

Error Message

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

Permission Denied

Cause

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 http://204.225.113.3/website/sanFran, 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:

    http://204.225.113.3/website/sanFran

    To access the site:

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

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

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

Article ID:000002457

Software:
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options