Authenticated users after IIS reset to .net

I am creating a .net web application and using cookie authentication to remember whether a user has been signed or not:

<authentication mode="Forms">
  <forms timeout="4320" cookieless="UseCookies" loginUrl="~/account.aspx" name="test" slidingExpiration="true" /> 
</authentication>

But after creating, modifying web.config, or doing IIS reset, the first page I load shows that I am not signed. But if I refresh the page again, it shows that I stopped by, even if I didn’t do anything.

So it looks like I remember that I was signed, but only after loading the first page.

Is this a common thing? Am I having something incorrectly configured in web.config? Is this a problem only with the local host?

+5
source share
2

, . web.config :

<appSettings configSource="appSettings.config" /> 

, appSettings.config . , ( ), .

, -, .net , , , ( , ).

+4

, reset. cookie, .

, " ",

 FormsAuthentication.RedirectFromLoginPage ("TheirUserId", Persist.Checked)

Persist.Checked, , . . http://msdn.microsoft.com/en-us/library/xdt4thhy.aspx

+1

All Articles