Sir,
In my web.config I have used customError tag to handle 404 with mode="ON".
Also added a global.asax and in Application_Error() method added below code:
var serverError = Server.GetLastError() as HttpException;
if (serverError != null)
{
if (serverError.GetHttpCode() == 404)
{
Server.ClearError();
Server.Transfer("/Errors/404.aspx");
}
}
But when I am publishing application to IIS and accessing, it does not handling 404.
What is the best way to handle it?