I can map all files (.*) to asp.net worker.How do I map NO FILE to asp.net worker?

  • Thread starter Thread starter alex
  • Start date Start date
A

alex

I can map all files (.*) to asp.net worker process. But that is a
perfomance hit and default documents are no longer working.

How do I map "NO FILE" to asp.net worker?

Like if I have an url : http://domain/id1/id2/

When there is no file name in the url IIS checks for such dir and
throws 404 BEFORE passing execution to asp.net worker.

In fact this url http://domain/id1/id2/nosuchfile.aspx would trigger
404 message BY ASP.NET WORKER

If I could get such no file request to be handled by asp.net worker
then I can use custom HTTPModule to rewrite url to something like
http://domain/page.aspx?a=id1&b=id2 or redirect to custom 404 page
depends on the situation.
 
How about setting Error 404 redirect page on the IIS Manager directly.
It's simpler and more usual way to handle this type of problem.
 
Back
Top