ERROR

System.Net.WebException when using json file in IIS wwwroot for HTTP counter

Last Published: April 25, 2020

Error Message

In ArcGIS Monitor Administrator, the following error may be returned when the URL for the Http counter is set to http://<hostname>.<domain>.com/<jsonfile>.json using the IIS wwwroot folder in C:\inetpub\wwwroot.

Error: System.Net.WebException when using json file in IIS wwwroot for HTTP counter

Cause

This error occurs because IIS does not serve that mime type by default. In addition, the URL contentType in ArcGIS Monitor is not expecting .json format. The solution to this error is to change the .json file to a .txt file.

In ArcGIS Monitor 10.7, an enhancement was made for the contentType to accept *.* format, to address this issue. Even with this enhancement in 10.7, IIS does not serve that mime type without configuring  IIS to process JSON.

Solution or Workaround

ArcGIS 10.6.x
  1. In the C:\inetpub\wwwroot folder rename the .json file to .txt.
  2. In ArcGIS Monitor Administrator, Add the Http counter.

Article ID:000019548

Software:
  • ArcGIS Monitor Administrator
  • ArcGIS Monitor Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic