• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

logging untrapped errors in web config and SQL table

ASP.Net  I need to log untrapped errors into a sql table, using webconfig ,
any examples? I need the table schema too, thanks.
0
john
Asked:
john
1 Solution
 
johnAuthor Commented:
Maybe something in the global.aspx file
using:
Server.GetLastError.GetBaseException
0
 
yeelokhkCommented:
You can catch the un-handled exception in Global.asax. And then insert a record in your SQL DB

Here is an example on catching un-handled exception and send out an email.
http://www.asp.net/hosting/tutorials/processing-unhandled-exceptions-cs

You may refer to this example and modify it to what you need
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now