1
Answer

facing some issue in session expire problem in .net server

hello guys ,
 
need some expert advice in session expire issue.
 
here is the issue i am facing:
 
 
Two Diff. Login: Admin And Users :
1] Set webconfig. (Localization)
<authentication mode="Forms">
<forms defaultUrl="~/admin/Dashboard.aspx" loginUrl="~/admin/login.aspx" slidingExpiration="true" timeout="2880"/>
</authentication>
<authentication mode="Forms">
<forms defaultUrl="~/User/Dashboard.aspx" loginUrl="~/User/login.aspx" slidingExpiration="true" timeout="2880"/>
</authentication>
2] On Server Multiple Hosting(10 Website) : We have to set unique machinekey or same will work on windows hosting.(Not in a Local)
<machineKey validationKey="#" decryptionKey="#" validation="SHA1" decryption="AES"/>
3] Session expire even after set below line.
<sessionState mode="InProc" cookieless="false" timeout="940"/>
Current added 2] and 3]...its not working. ..
 
which way i can resolve it ..
 
Thank you  
 

Answers (1)

0
Photo of Shubham Kumar
NA 6.5k 260.7k 9y
Hi Prashant!
 
I think it's a problem of hosting server iis application pool size, you could resolved this just this line of code in webconfig
 
  1. <connectionStrings>   
  2. <add name="ConnectionString"   
  3. connectionString="Data Source=localhost;  
  4. Min Pool Size=0; //set pool size   
  5. Max Pool Size=100;  
  6. Pooling=true;  
  7. Initial Catalog=Tracking;  
  8. Integrated Security=True;"  
  9. providerName="System.Data.SqlClient"/>   
  10. </connectionStrings>