Error: The API key used on this Web site was registered for a different Web site

Error Message

Loading an application using the ArcWeb Explorer JavaScript Application Programming Interface (API) displays the following error message:

"The API key used on this Web site was registered for a different Web site. You can register for an API key for this Web site on the ArcWeb Services Register URL page."


There are a number of causes for this error message.

Solution or Workaround

Apply the appropriate solution for the Web site being used:

  1. Make sure to access the Web page through a URL on a Web server, not as a file.
  2. Check the API key in the application for typing errors.
  3. Use lowercase letters, when registering the URL on the ArcWeb site: http://www.arcwebservices.com/v2006/account/account_register_url.do

    For example:
    is properly written as:

  4. Make sure that the URL of the application is registered:
  5. If the JavaScript API is used in a form, such as ASPX and SharePoint, follow the instructions in this sample:

    As in the above sample, add the following line of code to the onBodyLoad section: