WinHttpRequest send xml access denied 407 proxy ASP not VB

xml Sweden
  • 13 years ago

    Hi, I have a proxy on the intranet, I try to send an xml to an external url, in classic asp, using WinHttp.WinHttpRequest.5.1, but I get access denied from proxy for sending the xml and also The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. although I set proxy and correct credentials for it. Here is the code: second parameter is a Microsoft.XMLDOM object that i get the xml from it to send private function xmlsend(url, docSubmit) Set objWinHttp = server.CreateObject("WinHttp.WinHttpRequest.5.1") objWinHttp.SetProxy 2,"http://proxyurl:8080" objWinHttp.Open "POST", url, False objWinHttp.SetRequestHeader "CONTENT-TYPE","application/xml" objWinHttp.SetTimeouts 30000, 30000, 30000, 30000 objWinHttp.SetCredentials "proxyusername", "proxypassword", 1 objWinHttp.Option(6) = false objWinHttp.Send docSubmit.XML If objWinHttp.Status >=400 And objWinHttp.Status <=599 Then strErrorR = " Error Occurred : " & objWinHttp.Status & " - " & objWinHttp.statusText & "" response.Write "---------------------------------------" & strErrorR End If Set NewDoc = server.createobject("Microsoft.XMLDOM") newDoc.ValidateOnParse= True response.Write (objWinHttp.ResponseText) newDoc.LoadXML(objWinHttp.ResponseText) Set objWinHttp = Nothing Set XMLSend = NewDoc Set poster = Nothing end function Regards, Adrian

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.” - Dennis Ritchie