The following problem can occur when you attempt to upload files using Web Client that is not hosted on the SmartPlant Foundation server.
You cannot upload files from the Web Client to the SmartPlant Foundation server and you see the following error:
XMLHttpRequest cannot load [ServerRequest]. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin '[ClientHost]' is therefore not allowed access.
A CORS request (cross-origin resource request) is a resource request from a different server domain other than the one on which it is hosted. You must update the CORS section of the web.config file of the SmartPlant Foundation server to allow the upload from the server to perform the request:
In the allowedOrigins field of the web.config file, specify all the possible client origin domains, separated by a comma.
This must include the explicit protocol for each client origin domain.
Set the allowCredentials field option to True.
<oauth issuer="[OAuthServer]/oauth" requiredScopes="ingr.api"/>
<cors allowedOrigins="http://LocalHost1.Domain.com,http://LocalHost2.Domain.com" allowedMethods="*"