Is there a way to redirect the user to an error page (view) when an exception is raised in application_start method of global.asax? I get a Request object is null message when I try to do a redirect. How would i handle this? I have to raise the exception if certain conditions are not met and I want the user to go to a specific View.
My application is MVC3 based, btw.
Thanks
Application_Starthappens before ASP.Net starts processing the request.You could set a global static flag to indicate the error condition, then handle
BeginRequestand check the flag and redirect.