Microsoft KB Archive/186841

{|
 * width="100%"|

INFO: SF_REQ_GET_CONNID Unavailable in IIS 4.0

 * }

Q186841

-

The information in this article applies to:


 * Microsoft Internet Information Server 4.0

-

SUMMARY
The SF_REQ_GET_CONID option of the ServerSupportFunction callback for ISAPI filters is not implemented on Internet Information Server 4.0 and will not be available in future versions of Internet Information Server.

Unfortunately it was incorrectly documented as being supported in IIS 4.0.

MORE INFORMATION
Due to its limited use by customers and the significant performance impact its support would have on IIS applications flagged as running "Out of Process," this feature has been dropped in Internet Information Server 4.0 and future versions. This is by design.

The following code demonstrates the problem:

  DWORD dwConnID; if(!pCtxt->ServerSupportFunction(SF_REQ_GET_CONNID, &dwConnID, 0, 0)) {     DWORD dwError = GetLastError; } The purpose of SF_REQ_GET_CONNID was to enable sharing of data between an ISAPI filter and extension. An alternative method of accomplishing this is to add a custom header in response to SF_NOTIFY_PREPROC_HEADERS and extract this header in HttpExtensionProc. The following code illustrates how this could be done in an MFC ISAPI DLL:

  DWORD CMyFilt::OnPreprocHeaders(CHttpFilterContext* pCtxt,      PHTTP_FILTER_PREPROC_HEADERS pHeaderInfo) {     bRet=pHeaderInfo->AddHeader(pCtxt->m_pFC, "CustomHeader:",            "See you in HttpExtensionProc");

return SF_STATUS_REQ_NEXT_NOTIFICATION; }

void CMyExtension::Default(CHttpServerContext* pCtxt) {     char pszPointer[80]; DWORD dwSize = 80;

StartContent(pCtxt); WriteTitle(pCtxt);

// get the custom header set in OnPreprocHeaders pCtxt->m_pECB->GetServerVariable(pCtxt->m_pECB,           "HTTP_CUSTOMHEADER", pszPointer, &dwSize);

*pCtxt << _T("The following string was passed from a filter: "); *pCtxt << pszPointer;

EndContent(pCtxt); } © Microsoft Corporation 1998, All Rights Reserved.

Contributions by Robert Duke, Microsoft Corporation

Additional query words: kbDSupport kbdsi kbISAPI400bug

Keywords : kbdocfix

Issue type : kbinfo

Technology : kbiisSearch kbiis400