Hi all,

Is there a way to check what is the error for not displaying the code correctly while practising it in a website? Just like when the s/c is compiled in the vs editor.
I tried using trace.axd but i found it less helpful. when i wanted to make connections to the database and when there is something wrong in the connection it simply shows custom error page or runtime error page and no detailed errors.
i tried try{} catch {} blocks also but i didnt find my errors listed in.

Is there some way where we can see detailed error (just like VisualStudio compiler shows) in a website? Or is their some method to see errors??? Please let me know

8 Years
Discussion Span
Last Post by csharplearner

Probably the most professional way of handling application errors is to implement a custom page class which emails you when your application has an error.

To do this you:
1. Create a custom page class which inherits from System.Web.Page in your app_code folder
2. Override the OnError Event in the custom page class and add your error handling code
3. Have all your pages (aspx) inherit for your custom page class

using System.Web

public class CustomPage : Page
protected override void OnError(EventArgs e)
[INDENT]Your Error Handling Code Goes Here[/INDENT]

See here for a more detailed tutorial



thanks fr the reply.

But What is App_code folder??
Is it the root folder u r talking about?


Debugging is the best way to find exactly where and why runtime errors occurs in your solution

Well I enabled debugging=true in web.config page.. but where can i see those detailed errors just like the errors generated while compiled in VisualStudio?

the only way i kknow to see errors is in trace.axd page.
Is there anywhere else i can check to find out errors?

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.