5/4/2023 0 Comments Dyn updater winhttp dll error![]() I really recommend trying to port a quick test service to WinHTTP and testing on your client's Windows Server implementation to see if that resolves the problem.ERROR_WINHTTP_SECURE_FAILURE means one or more errors were found in the Secure Sockets Layer (SSL) certificate sent by the server. ![]() ![]() I would hazzard a guess that there may even be some Security Tokens and Privileges that WinInet needs under the hood to complete tasks, and some installs of Windows Server 200x may have the default setup to not provide those tokens to users running as a service account. But the fact that the documentation specifically says "don't do it" may suggest that some versions of Windows may not support it, specifically the later versions, and that some Service Packs or Automatic Updates may cause the current working instances to fail. I know your question suggests the code works for people already with it running it as a service. There are a few other subtleties, but you won't struggle. uses WinHttp.lib,WinHttp.dll instead of WinInet.lib, WinInet.dll.The difference in API between WinInet and WinHTTP are very small, you will pick it up very quickly. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP). In addition, it should not be used from a service. Note WinINet does not support server implementations. The online MSDN Documentation clearly states on every WinInet page: WinInet is designed for use by Application space users, and has ties back to Registry locations for the WinInet options (based on logged in user account). And finally, i cant understand why "FTP-Server" in msdn error desc? Also i cannot reproduce problem on similar workstations. I have googled two days, but not found not only solutions but also similar problems by anybody. Proxyinfo.dwAccessType = INTERNET_OPEN_TYPE_PROXY īOOL B = InternetSetOption(m_hNet, INTERNET_OPTION_PROXY, (LPVOID)(&proxyinfo), sizeof(proxyinfo)) ĭevent(TS::LL_HIGH, " InternetSetOption::Proxy failed ",ĭevent(TS::LL_CRITICAL, " InternetOpen failed ",ĭevent(TS::LL_CRITICAL, " InternetConnect failed ",ī = InternetSetOption(m_hConnect, INTERNET_OPTION_PROXY_USERNAME, (LPVOID*)Cfg::m_strProxyLogin.c_str(), Cfg::m_strProxyLogin.length() + 1) ĭevent(TS::LL_HIGH, " InternetSetOption::ProxyUserName failed ",ī = InternetSetOption(m_hConnect, INTERNET_OPTION_PROXY_PASSWORD, (LPVOID*)Cfg::m_strProxyPassword.c_str(), Cfg::m_strProxyPassword.length() + 1) ĭevent(TS::LL_HIGH, " InternetSetOption::ProxyPassword failed ",Īnd this is sending: // Try to get request handleĭevent(TS::LL_CRITICAL, " OpenRequest failed ",ĭevent(TS::LL_CRITICAL, " SendRequest failed ", Strncpy(szProxy, m_strProxyServer.c_str(), MAX_PATH - 1) Here is initialization code: m_hNet = InternetOpen(m_strAgent.c_str(), Herewith, equal HTTP-request, manually sent from IE address-line, succeeded. On my computer (WinXP SP2), on test workstations in our QoS-team (Win2003 Server) it works fine - over proxy and direct, proxy with auth and without).īut some of our customers, that uses this service and_proxy_with_authorization on Win2003 Server, have a problem - all calls of HttpSendRequest fails and GetLastError returns 12015 (ERROR_INTERNET_LOGIN_FAILURE, The request to connect and log on to an FTP server failed). I have created a Win32 Service which uses WinInet to send HTTP-requests to remote host.
0 Comments
Leave a Reply. |