Questions tagged [winhttp]

Windows HTTP Services (WinHTTP) is an HTTP client application library provided by Microsoft as part of Windows to send the requests through the HTTP protocol to other HTTP servers.

See Windows HTTP Services page for the WinHTTP documentation.

See also this seminal MSDN article detailing the use of the library's asynchronous API in C++.

This tag should be used for questions relating specifically to the WinHTTP library.

393 questions
117
votes
8 answers

How to give ASP.NET access to a private key in a certificate in the certificate store?

I have an ASP.NET application that accesses private key in a certificate in the certificates store. On Windows Server 2003 I was able to use winhttpcertcfg.exe to give private key access to the NETWORK SERVICE account. How do I give permissions to…
thames
  • 5,263
  • 6
  • 32
  • 44
32
votes
4 answers

Set proxy through windows command line including login parameters

I want to set a proxy throught the command line, first thing I found out is that you have to run command line with administrator rights - then the basic proxy set would be: netsh winhttp set proxy SERVER:PORT This works nice, but I also want to add…
jave.web
  • 11,102
  • 9
  • 70
  • 98
15
votes
3 answers

differences between Msxml2.ServerXMLHTTP and WinHttp.WinHttpRequest?

just when I finally understood the difference between Msxml2.XMLHTTP and Msxml2.ServerXMLHTTP http://support.microsoft.com/kb/290761 XMLHTTP is designed for client applications and relies on URLMon, which is built upon Microsoft Win32 Internet…
opensas
  • 52,870
  • 69
  • 227
  • 340
11
votes
1 answer

How to get HTTP status code from WinHttp request?

This page on msdn contains definitions of HTTP status codes presumably used in WinHTTP. Is there a way to retrieve HTTP status code from request made in WinHttp? The only way I've found to get to response text, is to call WinHttpQueryHeaders, which…
ghord
  • 11,057
  • 6
  • 36
  • 64
10
votes
3 answers

How to download a file with WinHTTP in C/C++?

I know how to download an html/txt page. For example : //Variables DWORD dwSize = 0; DWORD dwDownloaded = 0; LPSTR pszOutBuffer; vector vFileContent; BOOL bResults = FALSE; HINTERNET hSession = NULL, hConnect = NULL, …
singinanarchist
10
votes
3 answers

What's the recommended way to get winhttp.h?

Our application uses libcurl for HTTP, and we want to get access to Internet Explorer's proxy settings. An earlier Stack Overflow question recommends that we use WinHttpGetIEProxyConfigForCurrentUser and WinHttpGetProxyForUrl. Unfortunately, the…
emk
  • 56,152
  • 6
  • 40
  • 49
10
votes
2 answers

WinHttp Delphi wrapper

Please advise if there is a WinHTTP wrapper in Delphi XE In order of preference: a Delphi out of the box unit a third party open source pas file with ported entry routines a xxx_TLB.pas wrapper Solution: Since comments do not allow formatted code…
Gad D Lord
  • 6,130
  • 10
  • 50
  • 98
10
votes
1 answer

WinHttp.WinHttpRequest adding to the content-type

I'm trying to make a request to kigo's api using vba WinHttp.WinHttpRequest, i was able to send a request, but WinHttpRequest changes the content-type adding Charset=UTF-8 when it sends the request, with that kigo's api returns 415 error. I set the…
Manuel Peixoto
  • 312
  • 3
  • 14
9
votes
1 answer

How do you use WinHTTP to do SSL with a self signed cert

I seem to be having issues with this, and in the spirit of having a generic question that can be referenced by others, I am looking for a good example of using SSL. More specifically, I am getting the error 0x00002F8F from WinHttpSendRequest, which…
cylus
  • 317
  • 1
  • 3
  • 12
8
votes
3 answers

Cannot download microsoft symbols when running cdb in a windows service

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…
David Espart
  • 10,698
  • 6
  • 34
  • 49
8
votes
1 answer

Get RSA public key from CRYPT_BIT_BLOB in WinHTTP?

I am trying to get the RSA public key info in WinHTTP. So far I've got the certificate info in CERT_CONTEXT structure. I can get encryption algorithm and others as follows: PCCERT_CONTEXT cert; DWORD certLen =…
kushpf
  • 1,050
  • 10
  • 21
8
votes
2 answers

WinInet vs WinHttp (service or service-like process)

I can not understand the difference between these two concepts "service or service-like process". At msdn WinHTTP vs. WinINet page says: When selecting between the two, you should use WinINet, unless you plan to run within a service or…
Cobaia
  • 1,395
  • 3
  • 20
  • 39
6
votes
1 answer

C++ 307 Errors when trying to include winhttp.h in visual studio 2010

I have a big big problem. I'm trying to use WinHttp to download file with C++ and I'm using Visual Studio 2010 in order to do this thing. My problem is that the program is not compiling because are generated 307 errors, all refering to winhttp.h. …
Ionut Ungureanu
  • 360
  • 3
  • 8
  • 24
6
votes
1 answer

What is causing intermittent SEC_E_BUFFER_TOO_SMALL error coming from WinHttpSendRequest?

I have a tool which executes an HTTPS POST command against the same URL with same headers, same post body, etc. for a number of iterations. What I have run into is that for some testers, every so often the WinHttpSendRequest() function fails and the…
Nicholas Smith
  • 780
  • 6
  • 16
6
votes
1 answer

WinHttp POST body not received

I'm sending a WinHttp request with POST data to a php script on an IIS7 server, and the POST body isn't being received by the server. If I send via WinHttp using GET, or POST with a NULL body, or through an HTML form using POST with a body,…
Cannos
  • 61
  • 2
1
2 3
26 27