"An attempt was made to access a socket in a way forbidden by its access permissions" error when using Azure Web Apps


Description

Some requests might fail with an unhandled exception while accessing Sitecore JavaScript Services (JSS) websites hosted in Azure Web Apps. The issue occurs in cases when the JSS application works in the Integrated Mode.

The issue affects JSS 14.0.0 and earlier versions.

Solution

To resolve the issue, consider one of the following options: