Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I would like use the concept of session validations in my empty ASP.net MVC app.

So, can any one provide me the usefull links regarding using this sessions concept in my MVC app....
Posted
Comments
Sandeep Mewara 10-May-12 10:09am    
session validations in my empty ASP.net MVC app
What do you mean by session in EMPTY ASP.NET MVC app? Please elaborate on what are you trying to do?
P_A_1 10-May-12 10:31am    
I created the an MVC 3 application of type Empty ( not the Internet or Intranet) with user login and user sign up proces..

It is working fine but now let us say a user named as Ravi loged into application and browsing pages for some time and later he did not do any operations even the mouse click in the application for 3 minutes then, Ravi again tried to browse some pages then, the application must take him to Login page again...
This is my idea....

I hope you understand my point...

Now in which way we can do it....

1 solution

You use Session the same way as you do in ASP.NET Webforms.

Simply use the Session object: HttpContext.Current.Session["CurrentUser"]
 
Share this answer
 
Comments
VJ Reddy 10-May-12 20:23pm    
My 5!
P_A_1 10-May-12 23:56pm    
Sure Sandeep,

I will try once and let you know the updates

member60 11-May-12 4:54am    
My 5!
Sandeep Mewara 12-May-12 5:45am    
Thanks.
P_A_1 12-May-12 9:52am    
Hi sandeep,

Can you provide me link regarding this setting session to application in MVC..

Then,it would become easy to me....

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