The information in this article applies to:
SYMPTOMSWhen sending a POST HTTP request to an MFC ISAPI DLL, you may see an access violation occur in the debugger or get a message about a failed request from the Web browser. CAUSEThere is a bug in CHttpServer::GetQuery() which is located in ISAPI.CPP in the MFC source code directory (MSDEV\MFC\SRC). On line 206 of ISAPI.CPP, you can see the following code:
The data pointed to by pCtxt->m_pECB->lpbData is not null-terminated. In
fact, pCtxt->m_pECB->cbAvailable should be used to determine the number of
bytes to copy.
RESOLUTION
To resolve this problem, change ISAPI.CPP and rebuild the MFC ISAPI
Library.
to:
The new function will look like this:
You can rebuild the MFC ISAPI library by using the MFCISAPI.MAK file in the
\MSDEV\MFC\SRC directory. If the ISAPI DLL is built with MFC statically
linked (using NAFXIS(D).LIB), you can build the MFC ISAPI library by going
to the \MFC\SRC directory and typing:
NMAKE /f MFCISAPI.MAK DEBUG=1Specifying DEBUG=1 will build the debug version of the library. Do not use "DEBUG=1" if you want to build a release build of the library. If you are building your ISAPI DLL linking to the MFC DLL (using EAFXIS(D).LIB), you can build the MFC ISAPI library by going to the \MFC\SRC directory and typing: NMAKE /f MFCISAPI.MAK DEBUG=1 DLL=2For more information about other options you can specify on the NMAKE Command line, see the README.TXT file in the MSDEV\MFC\SRC directory or look at the MFCISAPI.MAK file. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 32- bit Edition version 4.2. Additional query words: ISAPI POST Internet Extension DLL
Keywords : kbcode kbISAPI kbMFC kbVC kbVC410bug kbVC420fix iisapi |
Last Reviewed: January 31, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |