Hi Alok,
You can try this code -
protected void Application_Error()
{
var exception = Server.GetLastError();
Response.Clear();
Server.ClearError();
var routeData = new RouteData();
routeData.Values["controller"] = "Home";
routeData.Values["action"] = "Index";
Response.StatusCode = 500;
IController controller = new HomeController();
var rc = new RequestContext(new HttpContextWrapper(Context), routeData);
controller.Execute(rc);
}
Thanks,
Girijesh