Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 mode="Forms">
<forms defaultUrl="~/User/Dashboard.aspx" loginUrl="~/User/login.aspx" slidingExpiration="true" timeout="2880"/>

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">
Currently added 2] and 3]...its not working. ..

which way i can resolve it ..

Thank you

What I have tried:

currently working on

Set webconfig. (Localization)
<authentication mode="Forms">
<forms defaultUrl="~/admin/Dashboard.aspx" loginUrl="~/admin/login.aspx" slidingExpiration="true" timeout="2880"/>

<authentication mode="Forms">
<forms defaultUrl="~/User/Dashboard.aspx" loginUrl="~/User/login.aspx" slidingExpiration="true" timeout="2880"/>
Posted
Comments
F-ES Sitecore 15-Feb-16 4:30am    
When you say the session expires are you referring to the "Session" object, or are you saying your users are no longer considered logged in? The timeout you're setting in your code is unrelated to the Session, authentication and Session are not linked.

1 solution

Although you can set a timeout value greater than the default ten minutes, the hosting service does not have to honour your request: each session occupies space in the webserver, and the longer sessions last the more memory and other resources are required to support the same number of clients. Many hosting services will not accept any increase in Session duration by default (and some limit it lower than 10 minutes).

You can either talk to your hosting service about increasing it - you may have to pay extra - or you can use Cookies instead as they are stored on the client PC and the lifetime can be a lot greater if you need it to be.
 
Share this answer
 
Comments
Member 12326181 14-Feb-16 7:06am    
thank you for your reply ..

we are working on form authentication we have 2 types of login

1 user
2 admin

so how can we deal with web.config file with 2 different login wires.

using form authentication do we need machine key on web.config file & session state??


Thank you

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