I don't know whats wrong because my site logs me out every minute.
I don't have an account folder instead i renamed it. Here i created a subfolder with files to let users edit the content.
After login, i open edit page to delete a picture and it reauires me to login again.
What is the problem?
I am thinking your scenario indicates you are browsing to a file outside of the folder that has WebSecurity.IsAuthenticated as a requirement or you have implemented roles and the user does not have the role required for the page.
Will "mark as answered" if your answers help me. Will you do the same?
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
574 Points
648 Posts
My website logs me out every minute.
Mar 01, 2016 09:14 AM|dow7|LINK
I don't have an account folder instead i renamed it. Here i created a subfolder with files to let users edit the content.
After login, i open edit page to delete a picture and it reauires me to login again.
What is the problem?
Contributor
2322 Points
2269 Posts
Re: My website logs me out every minute.
Mar 01, 2016 12:48 PM|wavemaster|LINK
I see behavior like that when the user does not have permission to browse to a particular page.
Simple Membership provider responds by sending the user to the login page.
Member
574 Points
648 Posts
Re: My website logs me out every minute.
Mar 01, 2016 07:28 PM|dow7|LINK
After login users have permission.
Is this affected by cache control?
Contributor
2322 Points
2269 Posts
Re: My website logs me out every minute.
Mar 02, 2016 01:14 PM|wavemaster|LINK
I am thinking your scenario indicates you are browsing to a file outside of the folder that has WebSecurity.IsAuthenticated as a requirement or you have implemented roles and the user does not have the role required for the page.
Member
574 Points
648 Posts
Re: My website logs me out every minute.
Mar 02, 2016 01:58 PM|dow7|LINK
It happend when i used:
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.SetExpires(DateTime.Now.AddMonths(3));
All-Star
32789 Points
3802 Posts
Microsoft
Re: My website logs me out every minute.
Mar 03, 2016 02:50 AM|Angie xu - MSFT|LINK
Hi,
If the issue is about page cashing, for example, the following @ OutputCache directive sets the page's expiration to 60 seconds:
<%@ OutputCache Duration="60" VaryByParam="None" %>
reference:
https://msdn.microsoft.com/en-us/library/y18he7cw.aspx
If it is about Session, the following code example sets the timeout session attribute to 30 minutes in the Web.config file.
<configuration>
<system.web>
<sessionState
mode="InProc"
cookieless="true"
timeout="30" />
</system.web>
</configuration>
reference:
https://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.timeout(v=vs.110).aspx
Regards,
Angie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.