« Previous Next »

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

Last post 09-16-2009 11:53 AM by anilr. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 09-09-2009, 4:10 AM

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

    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

  • 09-15-2009, 8:50 AM In reply to

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

    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

     

    WenJun Zhang - MSFT
    Sincerely
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 09-16-2009, 5:17 AM In reply to

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

    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
  • 09-16-2009, 5:18 AM In reply to

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

    who can help me
  • 09-16-2009, 11:53 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

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

    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
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (5 items)
Microsoft Communities