I'm developing a .NET MVC web application in C# which implements form authentication.
I have the below configuration in my web.config
file:
<authentication mode="Forms">
<forms loginUrl="~/Home/Register" timeout="10080" name="Test" slidingExpiration="true"/>
</authentication>
<sessionState cookieName="Test" timeout="5040"/>
I have some questions:
- Using the same name for session state cookie name and form cookie name is OK or it will cause problems/collisions for the parameters such as timeout?
- Setting
slidingExpiration="true"
causes renewal of timeout automatically or it requires calling some special function on the backend? - I have read the second comment of this answer: https://stackoverflow.com/a/17813200/1080355. So I set the form auth cookie time out twice of session time out. I'm doing it in the right manner?