Cookiecontainer problem with HTTPS

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,166
Latest member
DollyBff32
Top