winhttp

SSL with WinHTTP

梦想与她 提交于 2019-12-10 20:24:40
问题 I have created a simple web server with winhttp that has only one client, a website. It worked perfectly until I enabled SSL. I don't get any errors, and everything seems to work, but the website gets error code 104 when it tries to connect, and I don't see any activity in the server. The website was created by professionals, so the bug is very likely to be in my code. Since I know nothing about web programming, I created a test client in c++, to debug the problem. Without SSL it can connect

Cannot download microsoft symbols when running cdb in a windows service

可紊 提交于 2019-12-10 13:07:40
问题 I have a .NET windows service that is calling cdb.exe to analyze crash dumps. I want to download the symbols from http://msdl.microsoft.com automatically when needed, using the argument: -y srv*c:\symbols*http://msdl.microsoft.com/download/symbols If I run the application as a console application, It works as expected and it downloads the needed symbols for each dump. The problem is when I start the app as a windows service, the symbols are not downloaded and, if I turn symnoisy on, at cdb's

How can a synchronous WinHttp request be cancelled?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 11:11:27
问题 My service has a thread that may potentially be executing a WinHttpSendRequest when someone tries to stop my service. The WinHttpCloseHandle documentation says: An application can terminate an in-progress synchronous or asynchronous request by closing the HINTERNET request handle using WinHttpCloseHandle But, then later on the same documentation seems to contradict this. It says: An application should never WinHttpCloseHandle call on a synchronous request. This can create a race condition. I

Specify which Network Card/Connection Winhttp Must Use

拈花ヽ惹草 提交于 2019-12-10 10:29:48
问题 I have an application in C# that utilizes Winhttp to make web requests. Is there a way to specify which network card WinHTTP must utilize for its connections? 回答1: There is no publically available option for WinHTTP or WinInet to do Interface Affinity. It appears to be supported in System.Net via the BindIPEndPointDelegate on the Request's ServicePoint. I am curious what the scenario is to force a specific interface since it points to a problem in the rest of the stack to need such a thing.

WinHttp errors on option 9 / Win2008 / Classic ASP

痴心易碎 提交于 2019-12-10 10:15:55
问题 The Server I am connecting to requires TLS 1.1. My attempts fail. I am on a Windows Server 2008 R2 Standard SP1 64bit machine using Classic ASP. Here is my code: const WinHttpRequestOption_SecureProtocols = 9 const SecureProtocol_TLS1_1 = 512 dim objHTTP set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") No error: objHTTP.Option(9) = 128 'No error: objHTTP.Option(9) = &H80 'Errors right here: objHTTP.Option(WinHttpRequestOption_SecureProtocols) = SecureProtocol_TLS1_1 'Errors right here

Configuring proxy with WinHTTP and Excel

假如想象 提交于 2019-12-10 10:05:52
问题 I'm using WinHTTP to do a GET request in an Excel VBA Macro. However, if I try to do the request from a machine in a network with a proxy, it does not work. If I configure it manually, it works, but I don't think the people who'll use the tool I'm developing will know their proxy servers. Is there a way to autoconfigure the proxy server, or to get the proxy configuration from Windows? Here follows a sample code: Dim result As String Dim URL As String Dim winHttpReq As Object Set winHttpReq =

WinHttp: How to use a temporary certificate store?

こ雲淡風輕ζ 提交于 2019-12-10 10:03:10
问题 I have a C++ application that makes a HTTPS connection to one of our servers. In my ideal world, I would like the following to occur: App Starts App makes Windows trust the server's root CA (no GUI please, just system calls) App talks to server, does its work, etc. App makes windows forget about the server's root CA done I do NOT want this root CA to necessarily be trusted by other apps. Therefore I don't want to install the cert system-wide. I also would like it if the user did not need

VBA - Go to website and download file from save prompt

不羁岁月 提交于 2019-12-09 06:42:23
问题 I've been spending the last few hours trying to figure out how to save a file onto the computer using VBA. The code template below that I found on another forum seems promising, except when I go to the desktop to access it, the .csv file has what looks like the page's source code instead of the actual file I want. This may be because when I go to the URL, it doesn't automatically download the file; rather, I am asked to save the file to a certain location (since I don't know the path name of

VBA XMLHTTP Pagination Issue - Can't get past the second page of search results

好久不见. 提交于 2019-12-08 14:20:24
I'm developing VBA code to help keep an Excel workbook synced with a web invoicing service at https://www.fel.mx/CFDI33/Presentacion/Usuario/Ingreso.aspx I developed some working functionality using an Internet Explorer object and decided to try my luck migrating it to XMLHTTP to hopefully get better performance and reliability. The functionality I'm working on right now is simply to login to the web service and get a list of all the cancelled invoices As of now, I'm able to get past the login screen, navigate to the invoice registry, filter the list of invoices by "Cancelled" state and

VBA XMLHTTP Pagination Issue - Can't get past the second page of search results

北慕城南 提交于 2019-12-08 07:07:15
问题 I'm developing VBA code to help keep an Excel workbook synced with a web invoicing service at https://www.fel.mx/CFDI33/Presentacion/Usuario/Ingreso.aspx I developed some working functionality using an Internet Explorer object and decided to try my luck migrating it to XMLHTTP to hopefully get better performance and reliability. The functionality I'm working on right now is simply to login to the web service and get a list of all the cancelled invoices As of now, I'm able to get past the