2 replies

Last post Jun 10, 2004 02:25 PM by ojm37

  • Cookies!?!?!

    Jun 09, 2004 04:45 PM|ojm37|LINK

    I'm having problems with cookies again..... I'm creating a cookie inside a COM object that Is created in an asp page like this:set objThis = Server.CreateObject("MyComObject.Object1")Later, it is called like this:objThis.VerifyUser(strUsername, strPassword)Inside the VerifyUser routine, a cookie is set like this (if the username and password are correct):rp.Cookies("AUTHCOOKIE") = strAuthString rp.Cookies("AUTHCOOKIE").Domain = My problem is: I can't seem to delete the cookie when I want to log off the user! I've tried this:Response.Cookies("AUTHCOOKIE") = ""and this:Response.Cookies("AUTHCOOKIE").Expires = DateAdd("d",-10,now) But nothing seems to work. No matter what I do (short of closing the browser) the cookie is still there (response.write Request.Cookies("AUTHCOOKIE") writes out a value!). HELP!!!! TIA,
  • Re: Cookies!?!?!

    Jun 10, 2004 12:12 PM|ojm37|LINK

    OK. Here's some code (THIS DOES NOT WORK!): Testing Log In
    Log Off
    What am I doing wrong? Why does the cookie persist even after setting it's expires property to ten days ago? Thanks,
  • Re: Cookies!?!?!

    Jun 10, 2004 01:31 PM|ojm37|LINK

    OK. I got it. To delete the cookie:Response.Cookies("AUTHCOOKIE").Domain = "" Response.Cookies("AUTHCOOKIE").Expires = DateAdd("d",-10,now)This works. Cheers,