1

Hi i have create one project in the asp.net mvc c#.and i have create one login module and one is list of the user show after login in the project. i have do in login time i have set Userid and username set in the session. and after login successfully check session userid on user page and then after i have show user list.but i am after login my project run on browser and idea stay for the 5 mint and i am reload user list then automatically my session is null and i am redirect on login page. i want to session etlish for the 1 days store.

This is my set session value login time =>

Session["UserId"] = UserId;
Session["UserName"] = UserName;

i have try like this in web.config file set sessiontime out for the 1 days =>

<system.web>
<compilation targetFramework="4.5" debug="true" />
<httpRuntime targetFramework="4.5" maxRequestLength="52428800" />
<trust level="Full" />
<customErrors mode="Off" />
 <sessionState timeout="1440"></sessionState>
</system.web>

this is type i have try but not getting success and my session automatically null after 5 mint in ideal mode. any one now where is problem in the code.

adiga
  • 34,372
  • 9
  • 61
  • 83
Edit
  • 385
  • 4
  • 24

0 Answers0