Hi! I have two web sites (UI and API) developed using ASP.NET 5 (vNext) (Beta 6 framework libraries) and hosted in IIS7.
I get an intermittent error when I try to connect to the API from the UI website.
After restarting IIS server, it works. But in 4-5 days the same error happens again.
The error is as follows:
"XMLHttpRequest cannot load http://api.myhost.com/api/Account/Login. Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://myhost.com' is therefore not allowed access.
The response had HTTP status code 404."
NOTE: I have alrady set Access-Control-Allow-Origin to UI from the API.