URL Rewriting - File Access

URL Rewriting - File Access

am 10.09.2007 18:18:37 von nighteternal

I was attempting to implement simple URL Rewriting using an HTTP
Module in asp.net with C# with an event on BeginRequest and powered by
a
Context.RewritePath. I got everything to work fine.

When I was using FileMon, I noticed that aspnet_wp.exe attempts 2 file
access for the file that's rewritten, and doesn't find it. I am
trying to rewrite html files and have configured IIS to use the
aspnet_isapi.dll. I have removed "check if file exists".

I installed a different ISAPI filter (Ionic) to test. I noticed that
with this, disk access is not performed.

Is there any reason for this functionality with using ASP.NET
Rewriting? Is there a way I can stop it? I'm kind of interested in
why this is happening from a technical standpoint.

Thanks for your thoughts.

Re: URL Rewriting - File Access

am 11.09.2007 05:35:21 von David Wang

On Sep 10, 9:18 am, nighteter...@gmail.com wrote:
> I was attempting to implement simple URL Rewriting using an HTTP
> Module in asp.net with C# with an event on BeginRequest and powered by
> a
> Context.RewritePath. I got everything to work fine.
>
> When I was using FileMon, I noticed that aspnet_wp.exe attempts 2 file
> access for the file that's rewritten, and doesn't find it. I am
> trying to rewrite html files and have configured IIS to use the
> aspnet_isapi.dll. I have removed "check if file exists".
>
> I installed a different ISAPI filter (Ionic) to test. I noticed that
> with this, disk access is not performed.
>
> Is there any reason for this functionality with using ASP.NET
> Rewriting? Is there a way I can stop it? I'm kind of interested in
> why this is happening from a technical standpoint.
>
> Thanks for your thoughts.


This is a great ASP.Net question for ASP.Net forums. You will not find
the proper support for those questions here. You can also use
Reflector and troll through the ASP.Net managed pipeline code to
figure it out.

FYI: such a managed URL Rewriting module will just work on IIS7 with a
simple one liner configuration -- no more need to do the multi-step
hack to get it to work on IIS6+ASP.Net because managed code
extensibility is richly and optimally integrated into IIS7.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//