Cookiecontainer problem with HTTPS

Discussion in 'ASP .Net Security' started by Arne Garvander, Dec 26, 2007.

  1. The code below works fine in HTTP but does not work with HTTPS. I get no
    cookies in VS Studio 2005 when changing to HTTPS, but I get them in Fiddler.
    WHY?

    Imports System.Web
    Imports System.net

    Public Class CookieTest
    Public Sub test()
    Dim CC As New CookieContainer()
    Dim Req As HttpWebRequest
    Dim res As HttpWebResponse
    Req =
    WebRequest.Create("http://localhost:1209/AIMSSystem/cookietest.aspx")
    Req.Proxy = Nothing

    Req.CookieContainer = CC
    res = Req.GetResponse()

    Dim c As Cookie
    For Each c In res.Cookies
    Console.WriteLine(c.ToString())
    Next c

    End Sub

    End Class
    --
    Arne Garvander
    Certified Geek
    Professional Data Dude
     
    Arne Garvander, Dec 26, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Kuba

    CookieContainer with WebClient

    Martin Kuba, Aug 5, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    645
    Martin Kuba
    Aug 5, 2003
  2. Martin Madreza
    Replies:
    0
    Views:
    1,201
    Martin Madreza
    Nov 17, 2003
  3. guyhey
    Replies:
    2
    Views:
    6,088
    zvasanth
    Jan 12, 2008
  4. macro
    Replies:
    4
    Views:
    5,099
    macro
    Mar 29, 2006
  5. Replies:
    2
    Views:
    294
Loading...

Share This Page