Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IWebBrowser2 and lost cookies from window.open within browser

67 views
Skip to first unread message

boscowall

unread,
Jan 24, 2003, 12:20:06 PM1/24/03
to
We have an exe that invokes the IWebBrowser2 control and tomcat and we
run an "application" via a web browser on the users computer. The only
problem we are having is that when there is navigation from the
browser within the window to a new IE window (via window.open), the
cookie is not passed on and we lose all our session information.
Anyone know of a way to send this cookie to the window that was opened
by the IWebBrowser2 control?

We are not making a navigate call from the IWebBrowser2 control, the
user is merely clicking on a link within the browser that does a
window.open. I have done some research on this and have only found
instances of IWebBrowser2 maintaining the same cookie even after
invoking a new window.

I have confirmed that the cookie is not being passed in javascript,
vbscript, and server side.

Anyone have a solution to passing the cookie from the IWebBrowser2 to
the new window invoked by IE? We don't want to encode the session info
in the URL because of time consumption.

Or, anyone know WHY the cookie is not passed. Understanding may lead
me to enlightment.

-bosco

Igor Tandetnik

unread,
Jan 27, 2003, 6:26:26 PM1/27/03
to
Session cookies don't make it across process boundaries. You have a
WebBrowser control running in your process, and the new window opens in
Internet Explorer process. Try handling NewWindow2 event and creating a
new instance of WebBrowser inside your process for the new window. See
KB Article Q184876 "HOWTO: Use the WebBrowser Control NewWindow2 Event"
--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken

"boscowall" <r...@wubble.net> wrote in message
news:4a5d9730.03012...@posting.google.com...

0 new messages