• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

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