if you meet this issue, please read below post:
HttpSendRequest()
will fail with an error code of 2 (ERROR_FILE_NOT_FOUND
) when Windows/Internet Explorer is set to “Work offline” and the resource is not in the offline cache.
This doesn’t seem to effect .Net based HTTP clients or other web browsers like FireFox or Chrome making it not immediatly obvious if Internet Explorer is not the primary or default browser.
You can go back “online” by opening up Internet Explorer, going to the file menu (pressing Alt if it’s not visible), and unticking “Work offline”. After this, programmatic attempts to use WinInet will work correctly.
Note that Windows/Internet Explorer can get into this state accidentally if you set up dial up/VPN connections for testing or occasional use and its not set to “Never dial a connection”
See MSDN:
I feel that you are really angry about some PC guys asinkg you some stupid questions, right?Well, just forgive them. I feel really pretty on them, as they can’t use the best technology in the world. I was a PC guy, and I know how bad a PC is. Viruses, always slowing down, need a great resources…Why not a Mac?