Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to get the seession ID in asp.net using c#
Posted
Updated 7-Jan-15 19:33pm
v3
Comments
Praveen Kumar Upadhyay 8-Jan-15 2:00am    
Did you change the question. How you can get the SessionID in web.config?
Praveen Kumar Upadhyay 8-Jan-15 2:13am    
can you please elaborate your question. Using Session ID in we.config doesn't make any sense.
sridharan.N 8-Jan-15 4:25am    
I need to log exceptions in database and also insert the UserID.
Praveen Kumar Upadhyay 8-Jan-15 4:56am    
So you want to log the exception into the database with user_id?

1 solution

correct way is:

C#
HttpContext.Current.Session.SessionID
 
Share this answer
 
Comments
sridharan.N 8-Jan-15 2:10am    
How to use the SessionID in web.config sir

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