Forms Authentication

pks

Power Member
Boa tarde.
eu estou a utilizar o Forms Authentication no meu site. (codigo de um tutorial na net)
mas aquilo esta esquisito, porque antes de eu fazer login se tento aceder a pagina teste.aspx ele redireciona me para a pagina login.aspx de onde me redireciona para a pagina teste.aspx se o login tiver correcto. mas se depois faço logout e tento aceder a pagina teste.aspx, consigo acerder :s.
como consigo que ele faça mesmo o logout?
obrigado

o teste.aspx
Código:
[SIZE=2]<%[/SIZE][SIZE=2][COLOR=#0000ff]@[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]Page[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Language[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="VB"[/COLOR][/SIZE][SIZE=2] %>
<%[/SIZE][SIZE=2][COLOR=#0000ff]@[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]Import[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Namespace[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="System.Web.Security"[/COLOR][/SIZE][SIZE=2] %>
[/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]script[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]language[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="vb"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server">
Sub[/COLOR][/SIZE][SIZE=2][COLOR=#000000] SignOut(objSender [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=2][COLOR=#000000], objArgs [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#000000] EventArgs)[/COLOR]
[/SIZE][SIZE=2][COLOR=#008000]'delete the users auth cookie and sign out
[/COLOR][/SIZE][SIZE=2]FormsAuthentication.SignOut()
[/SIZE][SIZE=2][COLOR=#008000]'redirect the user to their referring page
[/COLOR][/SIZE][SIZE=2]Response.Redirect(Request.UrlReferrer.ToString())
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Sub
Sub[/COLOR][/SIZE][SIZE=2][COLOR=#000000] Page_Load()[/COLOR]
[/SIZE][SIZE=2][COLOR=#008000]'verify authentication
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] User.Identity.IsAuthenticated [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2][COLOR=#008000]'display Credential information
[/COLOR][/SIZE][SIZE=2]displayCredentials.InnerHtml = [/SIZE][SIZE=2][COLOR=#a31515]"Current User : <b>"[/COLOR][/SIZE][SIZE=2] & User.Identity.Name & [/SIZE][SIZE=2][COLOR=#a31515]"</b>"[/COLOR][/SIZE][SIZE=2] & _
[/SIZE][SIZE=2][COLOR=#a31515]"<br><br>Authentication Used : <b>"[/COLOR][/SIZE][SIZE=2] & User.Identity.AuthenticationType & [/SIZE][SIZE=2][COLOR=#a31515]"</b>"
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2][COLOR=#008000]'Display Error Message
[/COLOR][/SIZE][SIZE=2]displayCredentials.InnerHtml = [/SIZE][SIZE=2][COLOR=#a31515]"Sorry, you have not been authenticated."
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
End[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Sub
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]script[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]html[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]head[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]title[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>[/COLOR][/SIZE][SIZE=2]Forms Authentication[/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]title[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]head[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]body[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]bgcolor[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="#FFFFFF"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]text[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="#000000">
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]span[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]class[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Header">[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Forms Based Authentication using standard method[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]span[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]br[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]br[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="displayCredentials"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]br[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]br[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]form[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Form1"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server">
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]Button[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="cmdSignOut"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]text[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Sign Out"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]onClick[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="SignOut"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]form[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]body[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]html[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE]

web.config
Código:
[SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]authentication[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]mode[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Forms[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]forms[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]appNameAuth[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]path[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]loginUrl[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]login.aspx[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]protection[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]All[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]timeout[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]1[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]credentials[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]passwordFormat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Clear[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]user[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]teste[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]password[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]test[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]user[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]teste2[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]password[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]=[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]test[/COLOR][/SIZE][SIZE=2][COLOR=#000000]"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]credentials[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]forms[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]authentication[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE]


login.aspx
Código:
[SIZE=2]<%[/SIZE][SIZE=2][COLOR=#0000ff]@[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]Page[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Language[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="VB"[/COLOR][/SIZE][SIZE=2] %>
<%[/SIZE][SIZE=2][COLOR=#0000ff]@[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]Import[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Namespace[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="System.Web.Security"[/COLOR][/SIZE][SIZE=2] %>
[/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]script[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]language[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="VB"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server">
Sub[/COLOR][/SIZE][SIZE=2][COLOR=#000000] ProcessLogin(objSender [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Object[/COLOR][/SIZE][SIZE=2][COLOR=#000000], objArgs [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#000000] EventArgs)[/COLOR]
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text) [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]FormsAuthentication.RedirectFromLoginPage(txtUser.Text, chkPersistLogin.Checked)
[/SIZE][SIZE=2][COLOR=#0000ff]Else
[/COLOR][/SIZE][SIZE=2]ErrorMessage.InnerHtml = [/SIZE][SIZE=2][COLOR=#a31515]"<b>Something went wrong...</b> please re-enter your credentials..."
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
End[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]Sub
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]script[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]html[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]head[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]title[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Authentication Login Form[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]title[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]head[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]body[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]bgcolor[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="#FFFFFF"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]text[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="#000000">
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]form[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Form1"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server">
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]table[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="400"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]border[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="0"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]cellspacing[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="0"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]cellpadding[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="0">
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="80">[/COLOR][/SIZE][SIZE=2]Username : [/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="10">[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]TextBox[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="txtUser"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="150"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"/></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>[/COLOR][/SIZE][SIZE=2]Password : [/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="10">[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]TextBox[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="txtPassword"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="150"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]TextMode[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Password"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"/></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="10">[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]CheckBox[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="chkPersistLogin"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/>[/COLOR][/SIZE][SIZE=2]Remember my credentials[/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]br[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]width[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="10">[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]><[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]Button[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="cmdLogin"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]OnClick[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="ProcessLogin"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]Text[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="Login"[/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]/></[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]td[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]tr[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]table[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]br[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]br[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
<[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]div[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]id[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="ErrorMessage"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=2][/SIZE][SIZE=2][COLOR=#0000ff]/>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]form[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]body[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
</[/COLOR][/SIZE][SIZE=2][COLOR=#a31515]html[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]>
[/COLOR][/SIZE]
 
Faz o logout e depois volta a outra página com o Back Page!? É normal ele voltar mas se tentar fazer alguma coisa ele automáticamente salta para a página de LogIn.

Existe uma forma de limpar as páginas em cache do Browser ao certo também não sei o código.
Mas com um search no Google(Disable Back Button ASP.Net) vais encontrar resposta ao teu problema de certeza...


Cumps
 
Back
Topo