Search code examples
c#wpfreactjscefsharp

React Application works in browser but doesn't work in Cefsharp. Probably "Provisional headers are shown" issue


I host angular component what works as a map. There is a search feature that is a text box that returns the list of strings:

enter image description here

It works fine when it runs on browser, but it doesn't when I run it in cef browser component.

There are request-response sequence from browser application that works fine: enter image description here There are request-response sequence from WPF Cef applications: enter image description here

I believe that some configuration is missing for Cefsharp implementation. I tried all of things like "disable cache" etc., but it was all to no avail.

Additionally, for browser application that works, Security section shows "This page is not secure.": enter image description here

Whereas for Cef application it is 'The security of this page is unknown.":

enter image description here

My react application runs from localhost, whereas application in cefsharp runs from embedded resource:

http://app//resource/BrowserEx.ViewModels/web-gis-app/build/common-components/cc-gis-viewer/index.html?

enter image description here When I run the html file directly on browser on double click it throws exception: enter image description here

I will appreciate any advice, suggestion or even hint.


Solution

  • I finally found the reason by analyzing of my request-response URLs by Fiddler. My URL in Cefsharp was incorrect. Once I held my URLs in App.config file and config file doesn't like "&": enter image description here

    Here I found the solution for the issue.

    The solution was just to remove all amp; characters: enter image description here Hence, conclusion of all this mishmash: don't use & while building your URL, - use & instead!