
xmlhttp, works in winform, but not in webservice
Why does the following code work only in a winform application, but when I
try to use it in a webservice it fails. It only works with URLs inside our
firewall.
<WebMethod()> Public Function getHTML() As string
Dim http As New MSXML2.XMLHTTP()
http.open("GET", http://www.*-*-*.com/ , False)
http.send()
return http.responsetext
end function
I get this error:
System.Runtime.InteropServices.COMException (0x800C0005): Exception from
HRESULT: 0x800C0005.
at MSXML2.XMLHTTP.send(Object varBody)
at CCBS.CCBStools.GetHTML() in c:\inetpub\wwwroot\CCBS\CCBStools.asmx.vb
I DID do a proxycfg -u and this is the output:
Current WinHTTP proxy settings under
HKEY_LOCAL_MACHINE\
SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\
WinHttpSettings :
Flags = PROXY_TYPE_DIRECT | PROXY_TYPE_PROXY
Proxy Server = 10.10.0.9:8080
Bypass List =
;10.*;172.*;intranet;network;ntsviein0046;wien-100;wien-101
It seems to me that there must be a difference in how XMLHTTP behaves in a
Winform and in a webservice...
What do I need to do to get the webservice working?
cheers
Oliver