"You're Trying to Decode an Invalid JSON String" Error When Importing PI Tags in InsightCM

Issue Details

When importing PI tags into InsightCM (ICM) using the spreadsheet import, the import fails with the following error:

You're trying to decode an invalid JSON String: Please enable cookies. Sorry, you have been blocked. You are unable to access <DomainName>

This error occurs when a Web Application Firewall (WAF), such as Cloudflare, sits between the InsightCM server and the PI Web API and blocks InsightCM's HTTP requests. Instead of the expected JSON response, the PI Web API returns the firewall's HTML block page, which InsightCM cannot decode as JSON.

 

Solution/Procedure

Confirm the Issue Is Caused by the WAF

1. Log into the InsightCM server directly by its IP address instead of the domain name: browse to https://<IP_address>:<secure_port>. This bypasses the WAF layer, which is tied to the domain name.

2. Retry the spreadsheet import of the PI tags. If the import succeeds when accessing by IP address, the WAF is confirmed as the cause of the block.

Add a Temporary Binding in Internet Information Services (IIS)

If InsightCM shows as blocked when accessing by IP address, add a temporary exception in IIS to allow access:

 

 

1. Open IIS and drill down to the InsightCM <version> site, right-click it and select Bindings.

2. Click Add and configure the binding as follows: Type: https; IP address: All Unassigned; Port: <secure_port>; leave the Host name field empty; select the SSL certificate.

3. Click OK.

4. Right-click the InsightCM <version> site and select Manage Website > Restart.


 

 

Additional Information

The IIS binding created in this procedure is a temporary workaround. Remove the binding once the PI tag import is complete.

The permanent resolution is to request that the network/security team responsible for the WAF (for example, Cloudflare) add an exception (allowlist rule) for the InsightCM server's HTTP requests to the PI Web API, so the traffic is no longer blocked.

 

Do you need more help?

Submit your questions or requests using the Support Ticket Submission form.

Was this article helpful?
0 out of 0 found this helpful