Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Sat, 11 Mar 2006 09:24:26 -0800,    group: microsoft.public.platformsdk.internet.server.isapi-dev        back       


ISAPI Filter DLL - OnUrlMap is called multiple times   
Hi everyone,

I wrote a ISAPI filter DLL to process text/html content. Whenever there's a 
request for a .php file, the OnUrlMap gets called 3 times whereas .html or 
..asp files causes the right behaviour in Filter (i.e. - OnUrlMap gets called 
once only). How do I get rid off this problem? Below is the excerpt of the 
code -

DWORD OnSendRawData(...) {
  //Process pvRawData....
  ........
  //Writes HTTP HEADER to client
  pfc->WriteClient(....);
  //Writes BODY
  //pfc->WriteClient(...);
}

When the code executes for HTTP HEADER, the function gets suspended and the 
second request of the .php file calls OnSendRawData. When any Win32 API gets 
called in the OnSendRawData code, the second request is suspended and the 
first one is resumed (i.e.- starts writing the BODY).

As both are same actually request, it messed up the private (or content 
specific) data.

So, How to stop multiple request in OnUrlMap?
date: Sat, 11 Mar 2006 09:24:26 -0800   author:   Shoily Obaidur Rahman Shoily Obaidur

Re: ISAPI Filter DLL - OnUrlMap is called multiple times   
The behaviors you describe are all by-design.

http://blogs.msdn.com/david.wang/archive/2006/03/11/Why_some_ISAPI_Filter_events_trigger_multiple_times_per_request.aspx

-- 
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//

"Shoily Obaidur Rahman" <Shoily Obaidur Rahman@discussions.microsoft.com> 
wrote in message news:820D6BAE-C86B-4785-A8AF-B89DE39F2496@microsoft.com...
> Hi everyone,
>
> I wrote a ISAPI filter DLL to process text/html content. Whenever there's 
> a
> request for a .php file, the OnUrlMap gets called 3 times whereas .html or
> .asp files causes the right behaviour in Filter (i.e. - OnUrlMap gets 
> called
> once only). How do I get rid off this problem? Below is the excerpt of the
> code -
>
> DWORD OnSendRawData(...) {
>  //Process pvRawData....
>  ........
>  //Writes HTTP HEADER to client
>  pfc->WriteClient(....);
>  //Writes BODY
>  //pfc->WriteClient(...);
> }
>
> When the code executes for HTTP HEADER, the function gets suspended and 
> the
> second request of the .php file calls OnSendRawData. When any Win32 API 
> gets
> called in the OnSendRawData code, the second request is suspended and the
> first one is resumed (i.e.- starts writing the BODY).
>
> As both are same actually request, it messed up the private (or content
> specific) data.
>
> So, How to stop multiple request in OnUrlMap?
>
>
date: Sun, 12 Mar 2006 05:41:31 -0800   author:   David Wang [Msft]

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us