472,779 Members | 2,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Endless loop on delete auth cookie/abandon session

Hello all,

Not sure I can describe this adequately, but I am creating an endless loop
when an authenticated user signs out.

When the user signs out, I want to remove authentication, abandon session,
and redirect to default page. I need to use a custom cookie (I track separate
logins to multiple "companies"), so afaik can't use the standard
formsauthenication routines to create/delete the default ticket/cookie.

Here's the code to sign out:
Public Shared Sub DeleteAuthCookieEmail()
Dim cookie As HttpCookie = New HttpCookie(GetAuthCookieName)
cookie.Expires = DateTime.MinValue
End Sub

Here's code to create the cookie:
Public Shared Sub SetAuthCookieEmail(ByVal Email As String)
Dim cookie As HttpCookie = New HttpCookie(GetAuthCookieName)
cookie.Expires = DateTime.MinValue
cookie.Value = Email
End Sub

(GetAuthCookieName just returns a company-specific string for the cookie

When I delete my authentication cookie and then do the redirect, it
continues to run that block of code over and over. If I don't do the
redirect, it ends fine, which makes me guess that the removal of
authentication is "stuck" somewhere.

Anyway, I think I'm missing something fundamental with sessions, cookies,
tickets, and forms authentication, but just don't see it. All thoughts are
much appreciated.


Bill Borg

Nov 19 '05 #1
0 2112

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: jsWalter | last post by:
I have an extension Class to Auth and I'm looking for some folks to hammer on it a bit and give feed back. Class: AuthUser - add user (well, Auth does that now, so its gone) - remove user...
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no...
by: Param R. | last post by:
Hi all, we are experiencing an issue with regards to the auth cookie and a load balanced server farm. The user may randomly hit any box in the server farm. If the users authenticates against 1 box...
by: Daniel Michaeloff | last post by:
Hi all, I have an application that when finished redirects to a non-ASP.NET app which is choking on a huge ASP.NET session cookie. The cookie "ASP.NET_SessionId" gets transmitted by the browser...
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok....
by: Phil Powell | last post by:
// OBTAINED FROM http://www.javascripter.net/faq/settinga.htm // NOTE THAT IF YOU SET days TO -1 THE COOKIE WILL BE SET TO YESTERDAY AND THUS EXPIRE function setCookie(name, value, days, docObj)...
by: ad | last post by:
Hi, How can I delete the cookie in client?
by: tdavisjr | last post by:
Hi, Does anyone know how to force asp.net authentication to create a new session cookie after using the FormsAuthentication.SignOut() method. ASP.NET_SessionId is the name of the session cookie...
by: J. Frank Parnell | last post by:
The goal here is to use basic authentication for a user to log in, but keep a cookie so that they dont have to log in every browser session. <? $user = "user"; $pass = "pass"; ...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.