top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to avoid runtime error pages in asp.net application?

+2 votes
508 views

If somke error occurs i want the system to redirect to some other page and not show he error message.

<customErrors
   mode="RemoteOnly" 
   defaultRedirect="~/Error.aspx" />

This is not working.

posted Apr 28, 2014 by Khusboo

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Note: use capital O on Off

Another idea:
This error can be caused by a virtual directory not being configured as an application in IIS.
And if the server is remote (and it probably is) then perhaps you have this line:
Collapse | Copy Code

<authentication mode="Windows" /> 

if so, you might be blocked by the server with Windows Authentication, you might want to remove that line...

answer Nov 28, 2014 by Manikandan J
Similar Questions
+5 votes

How to change postion if a contrl at runtime in vb.net?

0 votes

How to get all values along with control Id using Jquery in ASP.NET?

+2 votes

How do I properly align pdf...?? I have different tables for different run..

...