Writing to the Windows Event Log

July 6, 2009 at 8:35 am Leave a comment

Writing errors to the Windows event log can be tricky, especially with permissions on custom folders.  Here’s a simple method that won’t require special permissions

using System.Diagnostics;

EventLog log = new EventLog();
log.Source = “Application”;
log.WriteEntry(“Your Message”, EventLogEntryType.Error);

If you’re capturing web service exceptions, be sure to capture the SoapException and write the Detail xml node.

Advertisement

Entry filed under: Programming. Tags: .

CRM 4.0 and Exchange 2010 Permissions to create Price List

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

July 2009
M T W T F S S
    Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Most Recent Posts


Follow

Get every new post delivered to your Inbox.