Click here to Skip to main content
15,896,915 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Console application with Asp.Net Project Pin
slSoftware24-May-10 1:56
slSoftware24-May-10 1:56 
GeneralRe: Console application with Asp.Net Project Pin
Not Active24-May-10 2:24
mentorNot Active24-May-10 2:24 
GeneralRe: Console application with Asp.Net Project Pin
slSoftware24-May-10 2:32
slSoftware24-May-10 2:32 
GeneralRe: Console application with Asp.Net Project Pin
Not Active24-May-10 3:02
mentorNot Active24-May-10 3:02 
QuestionHow to Display Confirmation Dialog Box Pin
cheguri23-May-10 21:18
cheguri23-May-10 21:18 
AnswerRe: How to Display Confirmation Dialog Box Pin
Dinesh Mani23-May-10 21:46
Dinesh Mani23-May-10 21:46 
QuestionenableEventValidation in IE Pin
sudheesh kumar s23-May-10 21:07
sudheesh kumar s23-May-10 21:07 
QuestionCustom error configuration setting Pin
A M SOMAN23-May-10 19:24
A M SOMAN23-May-10 19:24 
Hi,

I am implementing error handling in my website developed in ASP.Net MVC & C#. To do this, I have set CustomErrors attribute in my web.config file as below

customErrors mode="On" defaultRedirect="Error.aspx"

This should ideally redirect user to default error page which is present in Views/Shared/Error.aspx.
This bebavior was working perfetly untill I changed the base class of my controller classes. Earlier, the base class was "Controller" but for some internal logic, I changed it to ControllerBase and my ControllerBase is now inherited from Controller class.

For example

HomeController : ControllerBase
{
...
...
}

ControllerBase : Controller
{
...
...
}

But now when I run the application and some unhandled error occurs, the user is not redirected to Error.aspx any more. Instead it gives error page as below. Even if I set custom errors mode to "On".

----------------------------------------------------------------------


<configuration>
<system.web>
<customerrors mode="RemoteOnly">




Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customerrors> configuration tag to point to a custom error page URL.




<configuration>
<system.web>
<customerrors mode="On" defaultredirect="mycustompage.htm">



----------------------------------------------------------------------

Any help will be appreciated...

Thanks
Anil
QuestionDo I need to issue Http Code 301 when I use Response.Redirect ? Pin
Nadia Monalisa23-May-10 18:59
Nadia Monalisa23-May-10 18:59 
AnswerRe: Do I need to issue Http Code 301 when I use Response.Redirect ? Pin
Yusuf23-May-10 19:16
Yusuf23-May-10 19:16 
GeneralRe: Do I need to issue Http Code 301 when I use Response.Redirect ? Pin
Nadia Monalisa23-May-10 20:19
Nadia Monalisa23-May-10 20:19 
GeneralRe: Do I need to issue Http Code 301 when I use Response.Redirect ? Pin
Not Active24-May-10 1:49
mentorNot Active24-May-10 1:49 
Questioncustom AjaxEditorControl Pin
jitendrafaye23-May-10 18:35
jitendrafaye23-May-10 18:35 
AnswerRe: custom AjaxEditorControl Pin
barby.barby21-Feb-11 19:49
barby.barby21-Feb-11 19:49 
QuestionDynamic Table Row creation Pin
dwadasi23-May-10 18:29
dwadasi23-May-10 18:29 
AnswerRe: Dynamic Table Row creation Pin
Viral Upadhyay23-May-10 18:43
Viral Upadhyay23-May-10 18:43 
GeneralRe: Dynamic Table Row creation Pin
Dalek Dave23-May-10 23:30
professionalDalek Dave23-May-10 23:30 
GeneralRe: Dynamic Table Row creation Pin
Viral Upadhyay23-May-10 23:55
Viral Upadhyay23-May-10 23:55 
Questionjava script function call don't stop. Pin
buffering8323-May-10 16:46
buffering8323-May-10 16:46 
AnswerRe: java script function call don't stop. Pin
Not Active23-May-10 18:08
mentorNot Active23-May-10 18:08 
Questiontransaction stoppage or resume Pin
netsooz (Amir Hamidi)23-May-10 5:30
netsooz (Amir Hamidi)23-May-10 5:30 
AnswerRe: transaction stoppage or resume [modified] Pin
Blue_Boy23-May-10 11:57
Blue_Boy23-May-10 11:57 
QuestionOnline Exam System Pin
Feras Mazen Taleb23-May-10 4:34
Feras Mazen Taleb23-May-10 4:34 
AnswerRe: Online Exam System Pin
Blue_Boy23-May-10 12:05
Blue_Boy23-May-10 12:05 
GeneralRe: Online Exam System Pin
Feras Mazen Taleb23-May-10 16:33
Feras Mazen Taleb23-May-10 16:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.