winhttp

VBA downloading file with login isn't working

别说谁变了你拦得住时间么 提交于 2019-12-18 17:57:22
问题 I'm trying to download a file from this website, tried a bunch of code i can find and the file is downloaded but shows the html of the login page Below are 2 versions that I tried. I tried every code snippet I could find on SO and have had no luck so far. I tried both versions here, they had the same problem but their solution isn't working for me. Vba download file from internet WinHttpReq with login not working It seems like I'm not getting past the login process. I know that the variables

Not understanding why WinHTTP does NOT authenticate certain HTTPS resource

 ̄綄美尐妖づ 提交于 2019-12-18 07:07:22
问题 I'd be extremely grateful for any kind of help that may help me resolving the problem. From Excel VBA code I need to download & parse CSV file from HTTPS site https://redmine.itransition.com/. I try to use WinHTTP to get the file. However, I can't understand why authentication does not work. Here is the piece of related code: TargetURL = "https://redmine.itransition.com/projects/pmct/time_entries.csv" Set HTTPReq = CreateObject("WinHttp.WinHttpRequest.5.1") HTTPReq.Option(4) = 13056 '

WinHTTP.WinHTTPRequest.5.1 does not work with PayPal sandbox after TLS 1.2

偶尔善良 提交于 2019-12-17 18:47:27
问题 PayPal sandbox just recently restricted to TLS 1.2 connection. This makes our site stop working with PayPal sandbox although it stills work with the production PayPal. In the future the production PayPal will have the same restriction. We're using classic ASP and Microsoft WinHTTP.WinHTTPRequest.5.1 component for communication with PayPal. Here's the code below. objHttp.StatusText returns "Bad Request". We're on Windows Server 2008 R2. I tried to use MSXML2.ServerXMLHTTP.6.0 instead, but it

Vba download file from internet WinHttpReq with login not working

自作多情 提交于 2019-12-13 11:35:09
问题 I have been looking for a solution to automatize the dowload of a csv table from a site, but I haven't found a working solution. If I get on IE or Chrome, after previous log in I enter the url and the file automatically start dowloading. At this purpose I have another way of achieving what I need through IE and HTML object by navigating and then saving, but it uses sendkeys and it is not a suitable solution. I also tried to achieve that by a WinHttpReq download which to me seems the most

vba how to read and store LTPA?

点点圈 提交于 2019-12-13 03:14:12
问题 I'm trying to establish a "silent" connection using WinHTTP or xmlHTTP starting from an Excel form to our intranet. I've just written code that opens IE, does login, passes data, compiles form and gets the information I want. Now I want to do the same without open a IE session. I have written some code and I reach the aim to login and "navigate" to the next page but i can't go on. I think it's a problem with LTPA token. I asked before on the forum a more generic post. Here is my code ' Takes

What API to use for adding HTTP client support in an existing MFC app?

我们两清 提交于 2019-12-12 18:24:56
问题 I have recently been given a task to add the ability to interact with Web Map Services to an existing MFC application and I am in need of a client-side HTTP API. Based on my research, the leading candidates seem to be CAtlHttpClient and WinHTTP. I was curious to see if anyone had experiences they could share or opinions on which would be the better way to go (or suggestions for something else entirely). At first glance, CAtlHttpClient seems to be a bit higher level and easier to use. However,

C++ WinHTTP InternetReadFile not retrieving entire source

久未见 提交于 2019-12-11 16:01:12
问题 I am trying to get the content of a webpage using WinHTTP in C++. It is kinda working except i am on able to view parts of the source not the entire source. The OpenSSL stuff is there because eventually i want to be able to do HTTP over SSL, but that's the next challenge. #include <windows.h> #include <Wininet.h> #pragma comment(lib, "Crypt32.lib") #pragma comment(lib, "wininet.lib") bool SetupSSL(HINTERNET request) { HCERTSTORE store = CertOpenSystemStore(NULL,"CA"); DWORD ret = 0; bool ok =

c++ winhttp/wininet wrapper to post forms and upload files without mfc/atl

放肆的年华 提交于 2019-12-11 12:47:37
问题 could somebody point me to a winhttp/wininet based c++ wrapper which would not require mfc/atl? So that I might get it to work in MSVC express. I'd like to be able to use GET, POST and upload files too through HTML-form. I've checked several in codeproject.com but had trouble finding a suitable wrapper. Is there something that could help me? 回答1: Here I made you one to get you started. If you are using a MSVC you should learn how to dig down through dll's and find exported functions. DLL

Find the size of retrieved binary data with WinHttp.WinHttpRequest

半世苍凉 提交于 2019-12-11 03:06:28
问题 I've recently realized that URLDownloadToFile uses the IE proxy setting. So I'm looking for an alternative and found WinHttp.WinHttpRequest may work. It seems the ResponseBody property contains the fetched data and I need to write it to a file. The problem is that I cannot find the byte size of it. http://msdn.microsoft.com/en-us/library/windows/desktop/aa384106%28v=vs.85%29.aspx has the information for the object but I don't find relevant properties for it. Can somebody tell how? strURL :=

How to ignore invalid certificates with IWinHttpRequest?

[亡魂溺海] 提交于 2019-12-11 02:24:34
问题 i am using Microsoft's WinHttpRequest COM object to request a web-page with an invalid certificate: IWinHttpRequest http = new WinHttpRequest(); http.Open("GET", url, false); http.Send(null); Except that the call to Send throws an exception: 0x80072F0D - The certificate authority is invalid or incorrect How do i tell WinHttpRequest that i don't care, and i want it to retrieve the page i asked for? 回答1: The solution is to ignore four kinds of SSL errors: IWinHttpRequest http = new