Discussion:
WinHttpGetProxyForUrl returns error 12006
(too old to reply)
Sat
2010-05-18 18:52:01 UTC
Permalink
I have a simple PAC file in a server and I can access this pac file using URL
http://IPaddress/proxy.pac. I have specified the following as
WINHTTP_AUTOPROXY_OPTIONS for WinHttpGetProxyForUrl.

dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL;
lpszAutoConfigUrl = L"http://IPaddress/proxy.pac"; The IPaddress is valid
internal IP address.

But WinHttpGetProxyForUrl returns error code 12006 (meaning - the URL
specified a scheme other than "http:" or "https:"). I believe that
WinHttpGetProxyForUrl is able to access the proxy.pac because when I gives
incorrect IP address the return value is 12167 (The PAC file cannot be
downloaded. For example, the server referenced by the PAC URL may not have
been reachable, or the server returned a 404 NOT FOUND response.) .

I would appreciate if I can get help to double check any anything is missing
or incorrect in parameters used.

I am using Windows 7 and the pac script file used for testing is as given
below.

function FindProxyForURL(url, host)
{

return "PROXY dev.vidyo.com:55000";

}

regards,
Sat.
g***@gmail.com
2013-10-17 09:15:24 UTC
Permalink
Post by Sat
I have a simple PAC file in a server and I can access this pac file using URL
http://IPaddress/proxy.pac. I have specified the following as
WINHTTP_AUTOPROXY_OPTIONS for WinHttpGetProxyForUrl.
dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL;
lpszAutoConfigUrl = L"http://IPaddress/proxy.pac"; The IPaddress is valid
internal IP address.
But WinHttpGetProxyForUrl returns error code 12006 (meaning - the URL
specified a scheme other than "http:" or "https:"). I believe that
WinHttpGetProxyForUrl is able to access the proxy.pac because when I gives
incorrect IP address the return value is 12167 (The PAC file cannot be
downloaded. For example, the server referenced by the PAC URL may not have
been reachable, or the server returned a 404 NOT FOUND response.) .
I would appreciate if I can get help to double check any anything is missing
or incorrect in parameters used.
I am using Windows 7 and the pac script file used for testing is as given
below.
function FindProxyForURL(url, host)
{
return "PROXY dev.vidyo.com:55000";
}
regards,
Sat.
Hey, I have the same problem!

How did you fixed this?

Thank you for your help!

Best Regards :)

Continue reading on narkive:
Search results for 'WinHttpGetProxyForUrl returns error 12006' (Questions and Answers)
3
replies
I turned my laptop on and notepad opened up a file named debug?
started 2012-10-13 09:28:08 UTC
laptops & notebooks
Loading...