Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session lost when opening new window from w/in WebBrowser control

Status
Not open for further replies.

rshearin

Programmer
Jan 16, 2007
5
US
Tried posting this on asp.net board and someone suggested that I post it here.

New to asp.net - and only using it for a few days for a small project. I have a WebBrowser control inside of a form. On the asp webpage served inside the control from IIS, I set several session cookies using VB. I have verified that these get set by printing them on subsequent pages. However, if launch a new browser window using javascript(to be able to control the window attributes), a new browser session id is being created. For the moment, I am passing the params to the new window via javascript and resetting all of the session cookie values but would prefer not to have to do that.

1) Why is a new session being created? If I do all of this in IE or FireFox directly, a new session is not created.
2) Can anyone tell me how to do it w/out resetting all of the session cookies again?

Thank you in advance!
 
>>Why is a new session being created? If I do all of this in IE or FireFox directly, a new session is not created

this seems to be because of the webbrowser control, try calling the page directly in IE and then open the popup. is the same behavior happening???

and you are using the window.open() command for opening the new popup window right???

rather than that why not use DIVS to do the work? it solves the problem of opening a popup...

Known is handfull, Unknown is worldfull
 
The purpose of using window.open() is to remove the toolbars from the new window and set it's size - things that can't be done with DIVS.

Yes, the problem is something related to the Webbrowser control. Everything works fine in IE but I am using the Webbrowser control inside of a form so that I can secure the PC by removing the Start menu, status bar, Ctrl-Alt-Del, Alt-Tab and several other things so that the user can only work in the browser window that I want them to.
 
I am using the Webbrowser control inside of a form
Is this a windows application then?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
>>Is this a windows application then?

yeah, seems to be a windows application, thats why the session does not seem to share (as the new browser opened will be in a different context).

in this case i think the current approach that the poster has is the best approach...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top