<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Scott Elkin &#187; ASP.NET 2.0</title> <atom:link href="http://scottelkin.com/category/programming/aspnet-20/feed/" rel="self" type="application/rss+xml" /><link>http://scottelkin.com</link> <description>Tech, Love, Life</description> <lastBuildDate>Sun, 25 Apr 2010 16:29:15 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Myspace Statistics</title><link>http://scottelkin.com/programming/aspnet-20/myspace-statistics/</link> <comments>http://scottelkin.com/programming/aspnet-20/myspace-statistics/#comments</comments> <pubDate>Sat, 12 May 2007 06:15:44 +0000</pubDate> <dc:creator>Scott</dc:creator> <category><![CDATA[ASP.NET 2.0]]></category> <category><![CDATA[Technology]]></category><guid isPermaLink="false">/archive/2007/05/11/Myspace-Statistics.aspx</guid> <description><![CDATA[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): 185 Million Registered Users 50.2% Female / 49.8% Male Primary Age Demo: 14 &#8211; 34 Over the last 5 months, had between 39 and 45 [...]No related posts.]]></description> <content:encoded><![CDATA[<p>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):</p><p><img style="padding-right:20px;" alt="Myspace" src="http://farm1.static.flickr.com/136/325866918_e9e2dcc45d_m.jpg" align="left" border="0" /></p><ul><li>185 Million Registered Users<li>50.2% Female / 49.8% Male<li>Primary Age Demo: 14 &#8211; 34<li>Over the last 5 months, had between 39 and 45 Billion page views per month.<li>The second biggest site was Yahoo around 35 Billion. MSN, Google, Ebay and Facebook are all way behind with under 15 Billion.<li>350,000 new registrations each day<li>1 Billion total images on the site, 80 Terabytes of space, 150,000 requests per second<li>Millions of new images/day<li>25 Million Songs, 142 Terabytes of space, 250,000 concurrent streams<li>With Videos, 60 Terabytes of storage, 15,000 concurrent streams, 60,000 new videos / day<li>4.5 Million people on site on any one time<li>7 Datacenters<li>6000 web servers<li>650 ad servers<li>250 database servers<li>70,000 megabits per second bandwith (I run over 20 sites, some considered &#8220;large&#8221; and I don&#8217;t go above 2 mb/s</li><li>80% ASP.NET, 20% Coldfusion</li></ul><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://scottelkin.com/programming/aspnet-20/myspace-statistics/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Add Additional Information to Your Exceptions</title><link>http://scottelkin.com/programming/aspnet-20/add-additional-information-to-your-exceptions/</link> <comments>http://scottelkin.com/programming/aspnet-20/add-additional-information-to-your-exceptions/#comments</comments> <pubDate>Wed, 19 Jul 2006 07:37:00 +0000</pubDate> <dc:creator>Scott</dc:creator> <category><![CDATA[ASP.NET 2.0]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[Enterprise Library]]></category> <category><![CDATA[Exceptions]]></category> <category><![CDATA[Programming]]></category><guid isPermaLink="false">/archive/2006/07/19/Add-Additional-Information-to-Your-Exceptions.aspx</guid> <description><![CDATA[When Enterprise Library was called Microsoft Application Blocks, if you wanted to log an Exception, you would write (assuming &#8220;ex&#8221; 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 [...]No related posts.]]></description> <content:encoded><![CDATA[<p>When Enterprise Library was called Microsoft Application Blocks, if you wanted to log an Exception, you would write (assuming &#8220;ex&#8221; is an Exception):</p><pre><code>ExceptionManager.Publish(ex)</code></pre><p>And if you wanted to log some extended properties you could do something like this:</p><pre><code>NameValueCollection customerInfo = new NameValueCollection();
customerInfo.Add("name","scott");
customerInfo.Add("email","blah@blah.com");
ExceptionManager.Publish(ex,customerInfo);
</code></pre><p>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:</p><pre><code>ExceptionPolicy.HandleException(ex, "General Policy");
</code></pre><p>where “General Policy” is the name of the Exception Policy in the config file telling the Block what to do with the exception.</p><p>Looking in the config file, I noticed a formatter template with the following at the tail end of the template attribute, “…Extended Properties: {dictionary({key} &#8211; {value} )}&#8221;.  The formatter template is used to format the exception that is about to be logged somewhere.  Looking through the code for where it loops through this Dictionary, I noticed it accessing an IDictionary of <a href="http://msdn2.microsoft.com/en-us/library/system.exception.data.aspx">Exception.Data</a>.  Exception.Data?  Where did that come from?</p><p>Data is a new .NET framework 2.0 property of the Exception class to allow you to add any user-defined information about the exception.  Nothing more to it:  Just a simple name/value dictionary for your enjoyment.  As if you couldn’t figure it out, my new code would look like:</p><pre><code>ex.Data.Add("name","scott");
ex.Data.Add("email","blah@blah.com");
ExceptionPolicy.HandleException(ex, "General Policy");</code></pre><p>And as long as you use the default formatter, it will log this data at the end of the FormattedException field.</p><p>No related posts.</p>]]></content:encoded> <wfw:commentRss>http://scottelkin.com/programming/aspnet-20/add-additional-information-to-your-exceptions/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)

Served from: scottelkin.com @ 2010-07-30 03:47:54 -->