Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

logging untrapped errors in web config and SQL table

Posted on 2011-09-30
2
Medium Priority
?
348 Views
Last Modified: 2012-05-12
ASP.Net  I need to log untrapped errors into a sql table, using webconfig ,
any examples? I need the table schema too, thanks.
0
Comment
Question by:john
2 Comments
 

Author Comment

by:john
ID: 36893035
Maybe something in the global.aspx file
using:
Server.GetLastError.GetBaseException
0
 
LVL 9

Accepted Solution

by:
yeelokhk earned 2000 total points
ID: 36895782
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question