views:

325

answers:

1

I'm using WinHttp to do POSTs in a VB6 activeX control as follows

Set WinHttpReq = New WinHttpRequest
WinHttpReq.Open "POST", strUrl, False
WinHttpReq.SetAutoLogonPolicy AutoLogonPolicy_Always
aPostBody = 'Sometext'
WinHttpReq.Send aPostBody
UploadFile = WinHttpReq.ResponseText

This works great on windows XP (all versions of IE), but on windows 7 it sends back a 401 and Automatic Logon Policy doesn't work here (http://msdn.microsoft.com/en-us/library/aa383144%28VS.85%29.aspx)

A: 

After trying some more on the VB6 activeX control, I implemented the control in C# using

Code Project : Downloading C# ActiveX Components through CAB File

Works like a charm, no more authentication issues rather now I can do so much more since it's good old C#.

Yasir Laghari