We have a legacy VB Active X hosted by our ASP.NET site, which leverages the inet, making secure calls to our web site, honoring authentication.
Based on inspecting a sample POST from Fiddler, it sends ASP.NET_SessionId and Application specific cookies from User-Agent: Microsoft URL Control - 6.01.9782.
We'd like to replace the problematic Internet Transfer Control with the chilkathttp control.
I attempted to make an identical call immediately below the inet call, using logic similar to the logic below. We are receiving an authentication error, as expected.
Dim resp As ChilkatHttpResponse http.AddQuickHeader "DNT", "1" http.AddQuickHeader "Pragma", "no-cache" http.AddQuickHeader "Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*" http.AddQuickHeader "Host", "PC-201" http.AddQuickHeader "User-Agent", "Microsoft URL Control - 6.01.9782" Set resp = http.PText("POST", sURL, sPostData, "UTF-8", "multipart/form-data; boundary=" & sBoundary, 0, 0)
We are running into communication issues in some environments with some Microsoft service patches. The inet control returns an empty string, a POST call made to the same site using chilkathttp returns a 200, and a response indicating that authentication failed. We are using form based authentication, session cookies are passed by IE and by the inet control.
Is the Internet Transport Control granted special permissions when hosted in IE? Can we host the chilkathttp control in a manner which will give us similar pass through authentication.
As an experiment I tried to pass a cookie pulled from a file (below), where the contents were updated based on a current session visible from Fiddler. It didn't work, same authentication error. I don't even see my failed attempts in Fiddler from chilkathttp.
Dim Session Session = ReadTextFileAsString("c:\session.txt") http.AddQuickHeader "Cookie", Session
Instead of setting the UserAgent using AddQuickHeader, does using the .UserAgent property make a difference?