Vbscript Get proxy config for WinINET API -


i'm trying send http internal webserver , works fine unless due rerouting reasons, user has traverse proxy in order webserver, wininet 12029 error of "error_internet_cannot_connect attempt connect server failed." please can me pull in existing internet options proxy config? don't want define proxy credentials statically (nor have tried).

my code:

function httpget1 dim o, url, stat  url = myurl on error resume next  set o = createobject("microsoft.xmlhttp") ' if err.number <> 0   'msgbox err.number & err.description    'msgbox "cake"     'exit function ' end if o.winhttpgetieproxyconfigforcurrentuser o.open "get", url, false o.send stat = o.status 'cint(o.status) if stat = "200"    msgbox "account created successfully." elseif stat = ""   msgbox "connection attempt failed due to: " & err.description & "."   err.clear else   msgbox "http error code " & stat & " received." end if end function 

thanks time!

a pcap uncovered server responding ssl cert error api couldn't respond to. swapped out msxml2.serverxmlhttp.6.0 , able handle host name mismatch.

function httpget1 dim o, address, caseno, url, stat  url = myurl on error resume next  set o = createobject("msxml2.serverxmlhttp.6.0")  if err.number <> 0    msgbox err.number & err.description    err.clear    exit function  end if o.setoption 2, sxh_server_cert_ignore_all_server_errors o.open "get", url, false o.send stat = o.status 

the parameter 'sxh_server_cert_ignore_all_server_errors' 1 of options available via api , 1 not secure.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -