tags:

views:

88

answers:

0

Hello All,

I have currently implemented Url Rewriting with Url Rewriter and It is working fine, as per following article.

http://dotnetguts.blogspot.com/2008/07/url-rewriting-with-urlrewriternet.html

But I have notice that even though Url Rewriter redirect the page to Dynamic Page and everything works fine, it also executes error handling code in global.ascx because it assumes "Page Not Found Error" occured. And if you have error handling code in web.config file like following, than ErrorPage.aspx is also processed, no matter that page will never display, and you will never notice that, but internally when i tried to put break point I have notice that error page is also executed. How can i avoid this situation.

        <error statusCode="404" redirect="~/ErrorPage.aspx?ErrorCode=404" />