none
Why WinHttpSendRequest return 12030 error code on Windows 7 x64 OS

    General discussion

  • Hi All:
       Currently, I have met a strange issue about WinHttp function on one user's environment.
       The User's os is Windows7 7600 64bit. 
       The program will send get request to one https server.
      
       if(!::WinHttpSendRequest(m_hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0)) {
      DWORD dwError = ::GetLastError();             //here will get the error code is 12030
       return false;
     }

      When user open this https url in IE, it can be opened in IE and return the data. however, When program send the https request, it will not receive the response packet from the server. one more information, the program will work fine on another xp OS which is in the same NAT network with Windows7 OS, Could you please give me some suggestion about this case? Thanks in advance!
    Rejoice, I Desire!
    • Changed type Wesley Yao Tuesday, October 06, 2009 2:57 AM
    Monday, September 28, 2009 10:35 AM

All replies

  • Hi Jerry,

    Is possible a firewall issue? you could try to turn off the firewall in the Win7 machine.
    Which Service Pack installed in your XP machine? have you tried a Vista machine? and do all the HTTPS web sites return this error?
    If possible, could you please provide a repro project?

    Thanks,
    Wesley


    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, September 30, 2009 7:08 AM
  • We are changing the issue type to "General Discussion" because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by editing your initial post and click the button "Change Type" at the top of the post. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Thank you!


    Please mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, October 06, 2009 2:57 AM
  • Same problem here, getting 12030... did you find anything helpful? 

    Thank  you!

    Ovi
    Thursday, January 20, 2011 12:48 AM
  • I found this 

    ERROR_WINHTTP_CONNECTION_ERROR
    12030

    The connection with the server has been reset or terminated, or an incompatible SSL protocol was encountered. For example, WinHTTP version 5.1 does not support SSL2 unless the client specifically enables it.

    here

    http://msdn.microsoft.com/en-us/library/aa383770(v=vs.85).aspx

     

    I might be able to go further from here, looks like authentication is broken...

    Thursday, January 20, 2011 12:54 AM
  • In my case, I used this

    	DWORD protocols = WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 |
    		WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
    	WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS,	&protocols, sizeof(protocols));

    and it worked :)

    Monday, October 05, 2015 3:55 AM