Content

ASP.NET 2.0 Category

Myspace Statistics

12 May

+ 1

I am watching a programming presentation from the Myspace tech team right now. They are going over their stats and was blown away by the numbers (as of April 2007):

Myspace

  Leave Comment, 1 Comment

Add Additional Information to Your Exceptions

19 Jul

+ 0

When Enterprise Library was called Microsoft Application Blocks, if you wanted to log an Exception, you would write (assuming “ex” is an Exception):

ExceptionManager.Publish(ex)

And if you wanted to log some extended properties you could do something like this:

NameValueCollection customerInfo = new NameValueCollection();
customerInfo.Add("name","scott");
customerInfo.Add("email","blah@blah.com");
ExceptionManager.Publish(ex,customerInfo);

Now that I am upgrading all legacy code to Enterprise Library 2006 for .NET 2.0, I couldn’t find a way to do this since the only way to log an error is:

ExceptionPolicy.HandleException(ex, "General Policy");

where “General Policy” is the name of the Exception Policy in the config file telling the Block what to do with the exception.

  Leave Comment, 0 Comments