The Internet access code in our product works fine for 99.99% of people. However, for some of them, this simply does not work. We added some trace code to try to find out what the problem is, and it turns out that InternetOpenURL reports error 2 - "The system cannot find the specified file" - from this function call:
options = INTERNET_FLAG_RAW_DATA | INTERNET_FLAG_RESYNCHRONIZE; handle = InternetOpenUrl(internet,url,NULL,0,options,0);
(The Internet is a handle to an Internet connection opened with InternetOpen, url is the URL of a simple text file that exists on our web server.)
We test two different websites: one http and one https, which are located in completely different places (different domains, servers are located geographically separately), and they both give the same error for this guy and several others. 99% of people, including ourselves, can access them without any problems. In addition, affected people can access the same URLs without problems in their web browsers.
What could be here ?: (
EDIT : fortunately, we found out what happened wrong! It turns out that some people have the "Use a proxy server for your local network" checkbox set in their Internet options, without actually specifying a proxy server. We tried to use non-existent proxy server data and, of course, we ran into problems.
I still need to research a software solution for this, but anyone who reports a problem solves this problem with this solution:
- Open Internet Explorer
- Go to Tools → Internet Options
- Click the Connections tab.
- At the bottom there should be a button that says "LAN settings." Click on it.
- In the "Proxy server" field, uncheck "Use a proxy server for your local network"
- Click OK for everyone, restart Windows and try connecting to the Internet again through the product.
I have no idea why so many people have a checkbox, but a proxy server is not listed. But, apparently, this is what needs to be done to fix it.