I have some JavaScript code that works in FireFox but not in Chrome or IE. In the Chrome JS Console I get the follow error: "Uncaught SyntaxError: Unexpected end of input". The JavaScript code...

Understanding the Context

The API worked fine from Swagger. It would generate {"Unexpected character encountered while parsing value: e. Path '', line 0, position 0."} on using the published Blazor Server application. Both the API and Blazor Server app are hosted on same IIS server with different ports.

Key Insights

The underlying connection was closed: An unexpected error occurred on a receive. This problem occurs when the server or another network device unexpectedly closes an existing Transmission Control Protocol (TCP) connection.