-1

I'm trying to track down why my embedded GeckoWebBrowser (geckofx-45) is behaving differently when browsing across an HTTPS "authentication portal" (SSO portal).

My current theory is that testing with a standalone browser is somehow accepting and retaining cookies needed as the browser navigates, but the embedded geckofx is not (or is not serving the back to subsequent sites requesting them).

The CookieManager and Document.Cookie objects seem to be in flux, or not well documented. I have tried looking there (maybe not enough).

So I'm trying to figure out if there are any settings I need to enable when instantiating the GeckoWebBrowser control (or Xpcom/GeckoPreferences) to handle cookies as an interactive site might expect? I don't even need to persist the cookies across application runs...just for the duration the windows form is running the control.

Happy to supply more info or clarify if I am not being clear about what I'm trying to do. c#/.Net4/VS2015

Please see my thread-comment-reply, below.

AWeber
  • 381
  • 1
  • 3
  • 14
  • Possible duplicate of [Setting cookies for the GeckoFX web browser?](http://stackoverflow.com/questions/12440083/setting-cookies-for-the-geckofx-web-browser) – Joshua Drake Feb 15 '17 at 15:13
  • Possibly related: http://stackoverflow.com/questions/20485504/c-sharp-how-to-get-cookies-from-geckowebbrowser-control – Joshua Drake Feb 15 '17 at 15:13
  • I have looked at those two, previous posts. One is asking how to explicitly set cookies programatically, the other is trying to read cookies from the response. Neither is what I'm trying to do. I'm just trying to ensure that the control is managing cookies sent by the servers "normally" (and making them available for further servers to request). – AWeber Feb 15 '17 at 17:05
  • How did you come to your current theory? Did you run the code in debug and see that the cookie values were there for the full client and not there from the control? Did you observe the network traffic and see the cookie in one stream and not the other? – Joshua Drake Feb 15 '17 at 18:38
  • I tried capturing Fiddler traces, but with it all HTTPS, even with that feature enabled in Fiddler, I could not get complete results (Fiddler interferes to the extent that the test will not complete). It is a theory. I don't know why starting on the same page and clicking the same links would produce such different results. I figured someone experienced with the geckofx builds would be able to answer the questions readily and rule it in or out (or tell me how to explicitly test and check it). – AWeber Feb 15 '17 at 18:51

1 Answers1

0

What I found was that the GeckoWebBrowser was properly accepting and sending cookies. I used the information here: StackOverflow Question to further trace the request headers (and I had already been tracing the responses).

The root cause of the SSO portal not getting all the same info as a standalone browser was the lack of sending Authorization headers along to the trusted SSO servers. That was fixed by adding my trusted portals leveraging this info: StackOverflow Firefox Auth Question.

Community
  • 1
  • 1
AWeber
  • 381
  • 1
  • 3
  • 14