Welcome Guest Search | Active Topics | Sign In | Register

No access-control-allow-origin header is present on the requested resource Options
innovation ops team
Posted: Tuesday, April 26, 2022 3:01:29 PM
Rank: Newbie
Groups: Member

Joined: 4/25/2022
Posts: 1
We have purchased the latest EO.WebBrowser version. Details are - version is 22.0.40.0 which uses Chromium v96.
This is throwing an following error while we trying to extract data from server to client
No access-control-allow-origin header is present on the requested resource

With the same C# code we have never faced the issue using earlier EO.WebBrowser. Following are the details :
Old version is 19.2.91.0 which uses Chromium v70.

Need assistance here.
eo_support
Posted: Wednesday, April 27, 2022 11:39:17 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

This is due to changes in the newer browser engine that enforces CORS policy. If you have control over the web server, you can choose to add "access-control-allow-origin:*" to allow your request (from any origin).

If you do not have control over the web server, then you would need to turn off web security from command line to disable CORS policy check on the browser engine. You can do this by including "--disable-web-security" in EngineOptions.ExtraCommandLineArgs. For example, the following code set ExtraCommandLineArgs on the default options:

Code: C#
EO.WebEngine.EngineOptions.Default.ExtraCommandLineArgs = "--disable-web-security";


Note that this must be set before you create any WebView. Setting this value after the WebView has already been created has no effect.

Hope this helps. Please feel free to let us know if you still have any more questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.