none
HttpSendRequest fails with Error code 12057 RRS feed

  • Question

  • hi,

    I am using Windows 2003 Enterprise Edition Service pack 2.

    Here in my C++ application when I am using  HttpSendRequest() to request another server with ip and port information then I am geting error as 12057 with description "Unknown error has occured".

    As per analysis I found that in the process it is referring to Https certficate and trying to fetch CRL URL but it is not able to get the CRL because the server exist in Intranet environment where it needs authentication.

    Going through finding  I found certain knowledge base articles ( http://support.microsoft.com/kb/915787 , http://support.microsoft.com/kb/887196 and http://support.microsoft.com/kb/887195 ) according to which onward Wndows XP SP2 CAPI certificate uses the WinHTTP.dll process instead of the WinINet.dll process for network retrieval.

    Is there any way around where winhttp can get wininet authentication internally or any hot fix available for this on windows 2003 SP2.

    Thanks

    mm185195

    • Moved by Nick Asseloos Thursday, November 3, 2011 9:32 PM Off topic for this forum (From:Windows Server Solutions SDK)
    Tuesday, September 20, 2011 9:46 AM

All replies

  • I added this code after OpenRequest, ad this helped to bypass the problem:

    DWORDdwFlags = 0;

    DWORDdwBuffLen = sizeof(dwFlags);

    if(!InternetQueryOption([here goes handle from OpenRequest], INTERNET_OPTION_SECURITY_FLAGS, (LPVOID)&dwFlags, &dwBuffLen)) {  /*error handling using GetLastError();*/ return; }

    dwFlags |=

    SECURITY_FLAG_IGNORE_REVOCATION;

    if(!InternetSetOption([here goes handle from OpenRequest], INTERNET_OPTION_SECURITY_FLAGS, &dwFlags, sizeof(dwFlags))) { /*error handling using GetLastError();*/ return;}

    Wednesday, February 8, 2017 8:52 AM