Results 1 to 3 of 3

Thread: Storing cookies on a PC from my web site? RESOLVED

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Storing cookies on a PC from my web site? RESOLVED

    When I store cookies using:
    VB Code:
    1. If ValidateLogin(txtUsername.Text, txtPassword.Text) Then
    2.                 objTicket = New FormsAuthenticationTicket(txtUsername.Text, False, 5)
    3.                 objCookie = New HttpCookie(".ASPXAUTH")
    4.                 objCookie.Value = FormsAuthentication.Encrypt(objTicket)
    5.                 Response.Cookies.Add(objCookie)
    6.                 strReturnURL = Request.Params("ReturnURL")
    7.                 If strReturnURL Is Nothing Then
    8.                     Response.Redirect("Main.aspx")
    9.                 Else
    10.                     Response.Redirect(strReturnURL)
    11.                 End If
    12.             Else
    13.                 lblMessage.Text = "Incorect username/password"
    14.             End If
    Then IE MUST have it's privacy settings to LOW (medium is default) otherwsie the cookies don't work, and I get redirected back to my login screen....???!

    What am I doing wrong?

    Woka

  2. #2
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    I've succesfully used cookies in the past without problems in .NET in the situation where JavaScript and the server are able to communicate variables to each other.

    I know that cookies issued on one particular server may not be accessed by another server. Do you think that might be the case? Like in the instance where you've got several servers running?

    cudabean

  3. #3

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Problem has been fixed with the help of Mendhak.

    I was using a dynamic IP service at www.no-ip.com
    I specified it to mask the web name, thinking hide just the page name. Which it did.
    My cookies didn't work.
    I switched to www.dyndns.com and registered there.
    My cookies worked

    I went back to www.no-ip.com, and curiously turned the mask option off. This then showed my web page like 145.45.234.23/Main.aspx
    My cookies worked

    The question is, why does no-ip.com block cookies when you mask the web page? Hmmmmm...

    Anyways, I have switched to www.dyndns.com anyhow. But if anyone knows the answer can they let me know

    Cheers.

    Woof

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width