Click here to Skip to main content
16,012,153 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In login page i create a session and in target page i am getting session value it is working in localhost but when i upload into server session is not created and i am not able to get session in target page. if anyone plz help me ....thanks in advance.
Posted
Comments
Sunasara Imdadhusen 28-Apr-14 2:56am    
Can you please share code with us!!!
DamithSL 28-Apr-14 2:58am    
what is the error you get?
haisanthosh 28-Apr-14 3:21am    
Session["svar"] = strpassword;//password after login in login page
if (!string.IsNullOrEmpty(Session["svar"].ToString())) //target page here i get exception as "Object reference not set to an instance of an object" plz tell me
Ramug10 28-Apr-14 5:22am    
What is your session mode?
stateserver or inproc or sql server
[no name] 28-Apr-14 8:01am    
check your web.config file. also put your code of login page and the targeted page where your are checking the session

try to search in google there are so many links about session management .. :)

Understanding Session Management Techniques in ASP.NET[^]

ASP.NET - Managing State[^]
 
Share this answer
 
Can you check below code in the web.config

<sessionstate mode="InProc">

Then whether IIS Sever Sessionstate are enabled or not.both side the session should be enable,otherwise it will not work.

Regards,
Rathimaran.R
 
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