EXPROX.DLL fails after back-end ISAPI Extension WriteClient() call
Hi,
I am stuck with an Exchange front-end/back-end problem where my ISAPI
extension on the back-end server is trying to return an error message to the
client browser. The error message never gets there, and a few seconds after
calling lpECB->WriteClient( ) from the back-end server, EXPROX.DLL fails on
the front-end server with the following Event Log entry:
Source: Application Error
Category: (100)
Type: Error
Event ID: 1000
User: N/A
Description: Faulting application w3wp.exe, version 6.0.3790.1830,
faulting module exprox.dll, version 6.5.7638.1, fault address 0x0002ce94.
The back-end is configured to use Integrated Windows Authentication for the
Exchange virtual directory.
The front-end is configured to use Basic Authentication, and will use SSL in
the future, but currently is in the clear.
The code I am using in the back-end ISAPI extension is shown below, and
works fine in a standalone Exchange configuration, or if I connect directly
to the back-end server without going via the front-end server. (Error
handling has been removed for clarity)
void SendErrorResponse(const LPEXTENSION_CONTROL_BLOCK lpECB, const LPCSTR
szStatus, const LPSTR szError)
{
HSE_SEND_HEADER_EX_INFO HeaderExInfo;
HeaderExInfo.pszStatus = szStatus; //
usually "426 Conflict"
HeaderExInfo.pszHeader = "Content-type: text/plain\r\n\r\n";
HeaderExInfo.cchStatus = static_cast<DWORD>(strlen(
HeaderExInfo.pszStatus ));
HeaderExInfo.cchHeader = static_cast<DWORD>(strlen(
HeaderExInfo.pszHeader ));
HeaderExInfo.fKeepConn = FALSE;
BOOL bSuccess = lpECB->ServerSupportFunction( lpECB->ConnID,
HSE_REQ_SEND_RESPONSE_HEADER_EX, &HeaderExInfo, NULL, NULL );
DWORD dwBytesToWrite = static_cast<DWORD>(strlen( szError ));
bSuccess = lpECB->WriteClient( lpECB->ConnID, szError, &dwBytesToWrite,
HSE_IO_SYNC | HSE_IO_NODELAY);
}
Any thoughts would be greatly appreciated!
Thanks,
MikeC.
date: Tue, 23 May 2006 16:10:44 +0100
author: Mike