A
Arne Garvander
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
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