Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Forms Authentication, timing out in less than timeout period.

$
0
0

Hi I have forms authentication set up for a VB.Net 4.5 application with both the forms timeout and the sessionState timeout set to 20 minutes. It works fine on my development machine. However on the Shared hosted server(Not a web farm), user is redirected to login page in less than 20 minutes of inactivity. What am I missing?

Below is my web.config: As you can see, I have a tried to set the machineKey tag as well, but the issue remains.

<?xml version="1.0" encoding="utf-8"?><configuration><system.webServer><directoryBrowse enabled="false" /><modules><remove name="FormsAuthenticationModule" /><add name="FormsAuthenticationModule" type="System.Web.Security.FormsAuthenticationModule" /><remove name="UrlAuthorization" /><add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" /><remove name="DefaultAuthentication" /><add name="DefaultAuthentication" type="System.Web.Security.DefaultAuthenticationModule" /></modules><httpProtocol><customHeaders><remove name="X-Powered-By" /></customHeaders></httpProtocol></system.webServer><system.web><customErrors mode="Off" /><compilation debug="true" /><httpRuntime enableVersionHeader="false" /><!--The <authentication> section enables configuration   of the security authentication mode used by
      ASP.NET to identify an incoming user.   --><authentication mode="Forms"><forms cookieless="UseDeviceProfile" loginUrl="Login.aspx" defaultUrl="default.aspx" name=".ASPXAUTH" protection="All" requireSSL="false" timeout="20" slidingExpiration="true" /></authentication><authorization><deny users="?" /><allow users="*" /></authorization><!--Made the session timeout and the form authentication timeout so that the user is redirected back to login    page after 20 minutes and when they log back in they start with a new session as well.--><sessionState cookieless="UseDeviceProfile" mode="InProc" regenerateExpiredSessionId="false" timeout="20" /><pages masterPageFile="~/MyMaster.master" enableViewState="true" enableViewStateMac="true"/><machineKey  validationKey="86D46F91F5256B84881E32AE2573A5F2BC559403B8CA54886FC90F93C8D64B8A7D32DC158276F88AE9979CDBB9756F8CAF1B5E2FD602C07BD107057DCEC18ECE"
decryptionKey="3FD0350DB53C873554FE357616969A2A653B9EE5C36BDEB1F7D9F8EBC87EF9C5"
validation="SHA1"
decryption="AES" /></system.web></configuration>


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>