We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

How to End of the request onSendRawData and send my messeage to clientRSS

4 replies

Last post Sep 16, 2009 11:53 AM by anilr

  • How to End of the request onSendRawData and send my messeage to client

    Sep 09, 2009 04:10 AM|carlechen|LINK

    OnSendRawData , I find some keywords in the data, so i want to end of the request and send my message to client, i use these codes:

     pfc->ServerSupportFunction(SF_REQ_SEND_RESPONSE_HEADER,
            "404 Not Found", (LPDWORD)sm_pszHeader, NULL);

        DWORD dwDataLen = (DWORD)_tcslen(sm_pszSvrErr);
        return pfc->WriteClient(sm_pszSvrErr, &dwDataLen);

    return SF_STATUS_REQ_FINISHED

    But i find iis send the original data and my message to the client.

    How can i just send my mesage not including  original data

    c++ iis 6.0 IIS6.0 ISAPI Filter

  • Re: How to End of the request onSendRawData and send my messeage to client

    Sep 15, 2009 08:50 AM|WenJun Zhang - MSFT|LINK

    Please refer to David's blog. It contains a complete sample with detailed explanation which should help you find approach to do this.

    http://blogs.msdn.com/david.wang/archive/2005/07/01/HOWTO-ISAPI-Filter-rejecting-requests-from-SF-NOTIFY-PREPROC-HEADERS-based-on-HTTP-Referer.aspx

     

  • Re: How to End of the request onSendRawData and send my messeage to client

    Sep 16, 2009 05:17 AM|carlechen|LINK

    Thanks Firstly. I read the article three times,but i still not find answer. What i want to end of request on sendrawdata ,not OnPreprocHeaders
  • Re: How to End of the request onSendRawData and send my messeage to client

    Sep 16, 2009 05:18 AM|carlechen|LINK

    who can help me
  • Re: How to End of the request onSendRawData and send my messeage to client

    Sep 16, 2009 11:53 AM|anilr|LINK

    You have to set HTTP_FILTER_RAW_DATA's pvInData and cbInData to NULL and 0 respectively for the current and all future notifications for the current request.

    Anil Ruia
    Software Design Engineer
    IIS Core Server