English

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

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.

Related Information