Martin, did you provide me the correct code? I cannot even compile it since it gives me following error:
error C2039: 'ServerSupportFunction' : is not a member of '_HTTP_FILTER_PREPROC_HEADERS'
I saw the definition for HTTP_FILTER_PREPROC_HEADERS at http://msdn.microsoft.com/en-us/library/ttx6dzse%28v=VS.80%29.aspx and http://msdn.microsoft.com/en-us/library/ms525034%28v=vs.90%29.aspx.
Yes, I know it was just a snippet and I made it complete while trying. But you used ServerSupportFunction() using
HTTP_FILTER_PREPROC_HEADERS which does not contain this function.
I solved the problem. After sending header in send response event using ServerSupportFunction() you need to send the actual content in send raw data event as well, either using WriteClient() or whatever. Otherwise browser will keep waiting for response after
getting the header.
Marked as answer by mjawaid on Dec 21, 2011 12:49 PM
HCamper
8048 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 11, 2011 07:22 AM|LINK
Hello,
You could try this example and modify for your code.
HTH
Martin
Community Member Award 2011
HCamper
8048 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 11, 2011 06:21 PM|LINK
Hello,
A) "What is it waiting for now" ?
B) "Since it has received the correct header" ?
C) "Do I have to send anything else as well from filter" ?
D) "How do I do that" ?
You can Enable and Turn on "Failed Request Tracing" and look at the traces and logs:
IIS Net http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis/ guide.
Martin
Community Member Award 2011
HCamper
8048 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 13, 2011 10:54 PM|LINK
Have you asked at Stack Over Flow http://stackoverflow.com/questions/tagged/isapi ?
Martin
Community Member Award 2011
mjawaid
16 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 14, 2011 06:45 AM|LINK
Yes I posted on Stack Overflow as well but no response yet.
I will try the code you sent me but you did this in HTTP_PRE_PROC_HEADER while i need to do this in SEND RESPONSE. Anyway I will try your code.
mjawaid
16 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 15, 2011 12:42 PM|LINK
Martin, did you provide me the correct code? I cannot even compile it since it gives me following error:
error C2039: 'ServerSupportFunction' : is not a member of '_HTTP_FILTER_PREPROC_HEADERS'
I saw the definition for HTTP_FILTER_PREPROC_HEADERS at http://msdn.microsoft.com/en-us/library/ttx6dzse%28v=VS.80%29.aspx and http://msdn.microsoft.com/en-us/library/ms525034%28v=vs.90%29.aspx.
The error is correct.
HCamper
8048 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 15, 2011 04:44 PM|LINK
Hi,
The snippet of code may not compile is only part of a larger sample.
The code is just a snippet and not a complete project.
The snippet shows the include files required the types of structures and values.
I did not see in your code the same include files types & structures or classes.
Martin
Community Member Award 2011
mjawaid
16 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 15, 2011 05:46 PM|LINK
Yes, I know it was just a snippet and I made it complete while trying. But you used ServerSupportFunction() using HTTP_FILTER_PREPROC_HEADERS which does not contain this function.
mjawaid
16 Posts
Re: ISAPI Filter not running with ASP/ASP.Net/CF page
Dec 21, 2011 12:49 PM|LINK
I solved the problem. After sending header in send response event using ServerSupportFunction() you need to send the actual content in send raw data event as well, either using WriteClient() or whatever. Otherwise browser will keep waiting for response after getting the header.