asp.net mvc - Form Cookie Expiring too soon on production server -


i have following settings in web.config

<authentication mode="forms">       <forms loginurl="~/account/login"           slidingexpiration="true" timeout="2880" protection="all" />  </authentication> 

but cookie expires in less 5 minutes of inactivity. clue on happening?

i recognize behavior web host run 1 of sites. started when moving new servers, prepared dotnet 4. web.config ignored and, mention, 5 minutes seems break-point.

your question made me start digging around, looking working. started browsing forms-authentication category here on stackoverflow, 1 of tags used. after few minutes found similar question: asp.net forms authentication keeps displaying login page. in accepted answer suggested set cookieless="usecookies.

i checked own web.config , found cookieless left out, falling on default configuration. quick edit , testing gave positive result. worked great. edited file back, before , have had working session ten ours. added meta-refresh reloaded page every ten minutes. perhaps hosting company have tweaked parameter. sad thing have no solution :(

instead of running service in web server shipped with visual studio, try run locally in iis , see if can reproduce issue.

(to users answer questions guess if provide info production server, component versions , stuff. version of iis you're running , framework version build for. and, when run site in test use iis or light-weight web server in visual studio?)


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -