Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created a project in ASP.Net and I have some problems. When log in is done the application stores the session in Session["login"] = 1.

This session always get set to true in Firefox, Chrome, Safari, Opera but when I get session in IE the session is not stored and is lost.

I don't understand!

Help me this problem.
Thanks a lot.
Posted
Updated 6-Jan-11 21:45pm
v2
Comments
thatraja 7-Jan-11 13:23pm    
[Comment from OP, moved from answer]
I find out something.
Thank a lot......... :-)

The problem that you are experiencing can be solved in 3 ways see which one works for you.

1. Try to add session_write_close() (http://nl3.php.net/manual/en/function.session-write-close.php) before doing a header location

2. If you set your cookie params with session_set_cookie_params(604800,'','') you do not enter a path. This sometimes gives problems with IE7

3. Add the following cache header in you php Header("Cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, private");

Hopes this helps you.
 
Share this answer
 
Comments
Dalek Dave 7-Jan-11 3:55am    
Good Answer.
Kasson 7-Jan-11 3:56am    
Thanks Dalek.
B. Samyn 10-Oct-12 11:06am    
And php is the solution for a C#-issue?
 
Share this answer
 
Comments
Dalek Dave 7-Jan-11 3:55am    
Helpful Link
change the IE setting as below , tools;Internet Options;Privacy;Advance;Always allow session cookies.

Hope this will also solve your problem.
 
Share this answer
 
first you check the condition, During session is NULL, then initialise the value is 1.:thumbsup:
 
Share this answer
 

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