Home > Asp Net > Asp Net Logout Not Working

Asp Net Logout Not Working

Another example is I hardcoded a URL into the LogoutPageUrlto behttp://espn.go.com/; If I was in a subdirectory and clicked Logout, again I got the "Page cannot be displayed". I changed the startup page to be a page in the root (which is where login.aspx exists) and now it works as expected. CONTINUE READING Join & Write a Comment Already a member? Frank "Hernan de Lahitte" wrote in message news:OmCjsJ1xEHA.1188tk2msftngp13.phx.gbl... > This might be a page local caching issue. check my blog

This works This doesn't work Searching the web, there are a lot of people complaining that the LoginStatus doesn't work properly. Treat my content as plain text, not as HTML Preview 0 … Existing Members Sign in to your account ...or Join us Download, Vote, Comment, Publish. hey asp.net 2.0 I've placed a LoginStatus control on a master page (so I don't need to have it on every webpage) in my project. Member 43 Points 121 Posts Re: LoginStatus Logout not working Oct 21, 2008 05:02 PM|[email protected]|LINK set the LogoutAction to "Redirect" Reply eliasnunez None 0 Points

lbStatus.Text = "User" + User.Identity.Name + "is currenlty logged in";} } The problem is that when the user clicks the "Log Out" button the label status gets updated(fine) and if the When the user successully sign in they are redirected to a control panel page (admin.aspx), which contains a logout button with this code private void OnLogOutClicked(......) { FormsAuthentication.SignOut(); lbStatus.Text= "You have What does the actual path of air within a turbojet engine look like?

Latest Articles Clean a string in C# using RegEx Rendering a Twitter Tweet with Razor and C# MVC4 Get the progress of active SQL backups using TSQL List all Tables SQL The time now is 05:45 PM. Reply evagaba None 0 Points 12 Posts Re: LoginStatus Logout not working Sep 11, 2007 04:36 PM|evagaba|LINK I don't have any logout code. protected void Page_Load(object sender, EventArgs e) { Session.Abandon(); Response.Redirect("../Login.aspx"); } Permalink Posted 21-Nov-11 22:10pm Elanchezian523 Rate this: Please Sign up or sign in to vote.

Get 1:1 Help Now Advertise Here Enjoyed your answer? If you don´t what your page to be cached locally, you may add this code to the page load event: this.Response.Cache.SetCacheability( HttpCacheability.NoCache ); Hernan de Lahitte [url]http://weblogs.asp.net/hernandl[/url] "Zagor" escribió en If your ASP.NET page … ASP.NET How to change your primary email address Video by: Kyle Hi everyone! http://stackoverflow.com/questions/9688736/logout-redirect-on-asp-net-isnt-working This can be beneficial to other community members reading the thread. Reply evagaba None 0 Points 12 Posts Re: LoginStatus Logout not working Sep 13, 2007 08:58 AM|evagaba|LINK Tried this

Solution 5 Accept Solution Reject Solution Looks like i have to clear the cache as well ; string sKey = (string)Session["user"]; string sUser = Convert.ToString(Cache[sKey]); Cache.Remove(sUser); Permalink Posted 23-Nov-11 17:37pm pwtc2221.1K Is this incorrect? Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If I leave that breakpoint and login again with the returnurl on the link, it DOES hit the breakpoint.

Register Forum Archives Web Design and Development Web Programming Languages ASP.NET ASP.NET Security FormsAuthentication.SignOut() problem FormsAuthentication.SignOut() problem - ASP.NET Security Hi All, (thanks in advance for your time) I have a Solution 4 Accept Solution Reject Solution put this code in page_loadif (Session["Uid"] == null){ Response.Redirect("Login.aspx");}hope it is useful for youfrom vikranth reddy Permalink Posted 21-Nov-11 23:00pm vikranthreddych800 Add a Solution Add The commented code is how I had it set up first.