1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hotmail Cookies

Discussion in 'Visual Basic .NET' started by Stop Blocking Me, Mar 30, 2013.

  1. Stop Blocking Me

    Stop Blocking Me Newbie

    Joined:
    Dec 26, 2012
    Messages:
    23
    Likes Received:
    8
    Hello, everyone.

    I've been working with the Hotmail login lately to forward a list of e-Mail accounts to a specific address. While I've been able to log in using other applications in the past, It seems the standard cookie containers in VB.NET don't pick up specific cookies needed to actually log in. If you are missing these certain cookies, it will cause you to loop back to the login page without actually logging in. Has anyone experienced this lately? I've heard the Chilkat DOT NET component has much better cookie handling and would probably fix this, but I don't have experience with this specific Chilkat DLL to know if this is true. I'd be happy to give a free subscription to my proxy system if anyone has experience in this problem.

    Best wishes,

    Stop Blocking Me
     
  2. theMagicNumber

    theMagicNumber Regular Member

    Joined:
    May 13, 2010
    Messages:
    345
    Likes Received:
    195
    Yes, there are problems with CookieContainer in .NET. Sometimes you have to parse the cookies manually. Set AllowAutoRedirect to false, sometimes it is causing problems, and make manual navigations.
     
  3. Stop Blocking Me

    Stop Blocking Me Newbie

    Joined:
    Dec 26, 2012
    Messages:
    23
    Likes Received:
    8
    The redirect only happens because it does not actually log you in when you're missing the cookies. I have tried looking through all of the set-cookie values, but I think there are still some key ones missing. I need to take another close look. Thank you for your reply.

    Any other ideas?
     
  4. theMagicNumber

    theMagicNumber Regular Member

    Joined:
    May 13, 2010
    Messages:
    345
    Likes Received:
    195
    I had the same problem with Wordpress login. The CookieContainer didn't parse the cookies correctly, so i had to parse Set-Cookie header manually. If the cookies are missing from the header, than they are set with JS. You will have to figure the javascript out or use libraries like selenium.
     
  5. Stop Blocking Me

    Stop Blocking Me Newbie

    Joined:
    Dec 26, 2012
    Messages:
    23
    Likes Received:
    8
    I've added all of the cookies from the Set-Cookie field. I've emulated the JavaScript cookies, but there's one field left. It's simply called C= under NAP. It's in all the requests and I'm not sure if it can be emulated with ease.
     
  6. Stop Blocking Me

    Stop Blocking Me Newbie

    Joined:
    Dec 26, 2012
    Messages:
    23
    Likes Received:
    8
    I may have found a way to access Hotmail in another form. I have no clue if it will work if the accounts aren't activated yet though.
     
  7. Herion

    Herion Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 8, 2012
    Messages:
    289
    Likes Received:
    73
    1) Are you using hotmail's mobile website to login? If you are, make sure you set a mobile useragent. Might be the issue.
    2) Are you using the same cookiecontainer throughout? Ex: after the response is received, do something like cookieContainer.Add(response.Cookies);

    Wrote out a quick test and had no problems logging in.
     
  8. Stop Blocking Me

    Stop Blocking Me Newbie

    Joined:
    Dec 26, 2012
    Messages:
    23
    Likes Received:
    8
    1. I have tried both, with both a regular an a mobile useragent.
    2. The same cookiecontainer is being used with throughout.

    You managed to successfully log in without any issues?

    Thanks for your time.