Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have more than one webbrowser controls on my program, and it seams they all share session cookies. What i want is that they DONT share the session cookies.

I have different webbrowser controls that opens the same website with different accounts, or open the same web-page that store different data in session.

Anyone has any idea?
Posted

You can operate your session state in cookieless mode. This means you're required to persist a session reference using the url. But this will be ideal for you as each new request without a session parameter in the url will create a redirect with a new session which is your desired result.

Here is a starter on cookieless session state.

http://msdn.microsoft.com/en-us/library/aa479314.aspx[^]
 
Share this answer
 
hmmmm i am not sure with your meaning ! but i building multiple browser for multiple user to login in the same website ! but all webbrowser control in my form shared session, so i can't login multiple user in the same website !
Please help !
 
Share this answer
 
Cookies when stored in non-persistent mode can only be shared by one browser at a time i.e. IE for instance. but multiple instances of IE can use this cookie. but other browsers will not be able to access it. So if other type of browsers i.e. Chrome is able to access the session cookie then perhaps you need to make this cookie non-persistent. (which currently could be persistent).


IF you don't want multiple instances of same browser to access the session cookie then configure the cookie-less session and read about cookie munging. by doing so the session information will be kept in URL and not in cookies and thus multiple instances of same browser will not be able to access it.
 
Share this answer
 
Comments
sokunthor 17-Dec-12 12:14pm    
hmmmmm i still not clear your solution, hope you give me some code to understand and also i am not meaning to use IE, i using WebBrowser control
Thank in advanced

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900