Author: shurabhavesh | Posted on: 10/1/2008 12:38:50 AM | Views : 404

I have created a web application in which if requested page does not exists (error - 404), i redirect the user to centralized error page with following code in Application.Error event in global.asax


//code start
string strRequestedURLWithQueryString = ((System.Web.HttpApplication)(sender)).Request.Url.AbsoluteUri;
Server.ClearError();
Server.Transfer("~/Error.aspx?RequestedURL=" + Server.UrlEncode(strRequestedURLWithQueryString));
//code End


When I run the appication from direct source file (without publishing), above code works fine, however when i deployed the application to the production server (after publishing) it does not takes the user to the page Error.aspx.

Can anyone comment on the same?

Thanks in advance

...

Go to the complete details ...