<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.newtonking.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>James Newton-King</title><link>http://james.newtonking.com/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.newtonking.com/jamesnewtonking" /><feedburner:info uri="jamesnewtonking" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Json.NET 5.0 Release 6 – Glimpse Plugin</title><link>http://feeds.newtonking.com/~r/jamesnewtonking/~3/7gzVAVrThoA/json-net-5-0-release-6-glimpse-plugin.aspx</link><pubDate>Thu, 06 Jun 2013 11:30:00 GMT</pubDate><guid isPermaLink="false">bce7ef4a-1ab4-4a64-ae34-bb54d1362c7e:57416</guid><dc:creator>James Newton-King</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The big new feature in this release is a Json.NET plugin for Glimpse. For anyone not familiar with &lt;a target="_blank" href="http://getglimpse.com/"&gt;Glimpse&lt;/a&gt;&amp;nbsp;it is an open source diagnostics tool for ASP.NET, bringing the server-side information of a webpage into the browser. It is very useful and takes just a couple of minutes to get running.&lt;/p&gt;
&lt;p&gt;The Glimpse Json.NET plugin adds a JSON tab to the Glimpse UI with information about each time Json.NET is used on the server, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Serialized type&lt;/li&gt;
&lt;li&gt;Time taken&lt;/li&gt;
&lt;li&gt;Any errors (with stack trace)&lt;/li&gt;
&lt;li&gt;The complete JSON document&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Being able to see the complete JSON document that Json.NET serialized or deserialized will be particularly useful when debugging unexpected results.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://james.newtonking.com/images/glimpsejsontab.png"&gt;&lt;img src="http://james.newtonking.com/images/glimpsejsontab_small.png" alt="You got star quality, like the Hulk in movies other than The Hulk." title="You got star quality, like the Hulk in movies other than The Hulk." /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The plugin also adds Json.NET events to the Glimpse timeline tab. The timeline tab is lets you see when and where Json.NET is used in a request. In the example below JSON is deserialized in the ASP.NET MVC controller action and then re-serialized in the Razor view.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://james.newtonking.com/images/glimpsetimelinetab.png"&gt;&lt;img src="http://james.newtonking.com/images/glimpsetimelinetab_small.png" alt="Do not question the wisdom of Tom Skerritt." title="Do not question the wisdom of Tom Skerritt." /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Today all calls to SerializeObject/DeserializeObject will automatically show up in Glimpse and going forward the frameworks that use Json.NET should also start appearing. Making all JSON actions on the server (deserializing the JSON request, serializing the JSON response, calls to JSON services like Web API/Facebook/Twitter, etc) visible in the browser for debugging without digging into tools like Fiddler will be very useful.&lt;/p&gt;
&lt;p&gt;Download the Json.NET Glimpse plugin off NuGet now:&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="https://nuget.org/packages/Newtonsoft.Json.Glimpse/"&gt;&lt;img src="http://james.newtonking.com/images/glimpsejsonnuget.png" alt=" Wearing scarves in non-scarf weather is the essence of cool." title=" Wearing scarves in non-scarf weather is the essence of cool." /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is a complete list of what has changed since Json.NET 5.0 Release 5.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New feature - Added serialized/deserialized JSON to verbose tracing &lt;/li&gt;
&lt;li&gt;New feature - Added support for using type name handling with ISerializable content &lt;/li&gt;
&lt;li&gt;Fix - Fixed not using default serializer settings with primitive values and JToken.ToObject &lt;/li&gt;
&lt;li&gt;Fix - Fixed error writing BigIntegers with JsonWriter.WriteToken &lt;/li&gt;
&lt;li&gt;Fix - Fixed serializing and deserializing flag enums with EnumMember attribute &lt;/li&gt;
&lt;li&gt;Fix - Fixed error deserializing interfaces with a valid type converter &lt;/li&gt;
&lt;li&gt;Fix - Fixed error deserializing ISerializable objects that also implement IConvertible &lt;/li&gt;
&lt;li&gt;Fix - Fixed potential infinite loop when parsing unquoted JSON values &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://json.codeplex.com/"&gt;&lt;strong&gt;Json.NET CodePlex Project&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://json.codeplex.com/releases/view/107620"&gt;Json.NET 5.0 Release 6 Download&lt;/a&gt;&lt;/strong&gt; &amp;ndash; Json.NET source code and assemblies&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://james.newtonking.com/aggbug.aspx?PostID=57416" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/jamesnewtonking/~4/7gzVAVrThoA" height="1" width="1"/&gt;</description><category domain="http://james.newtonking.com/archive/tags/Json.NET/default.aspx">Json.NET</category><category domain="http://james.newtonking.com/archive/tags/Project/default.aspx">Project</category><feedburner:origLink>http://james.newtonking.com/archive/2013/06/06/json-net-5-0-release-6-glimpse-plugin.aspx</feedburner:origLink></item><item><title>Json.NET 5.0 Release 5 – DefaultSettings and Extension Data</title><link>http://feeds.newtonking.com/~r/jamesnewtonking/~3/LBPwcLtIPQU/json-net-5-0-release-5-defaultsettings-and-extension-data.aspx</link><pubDate>Wed, 08 May 2013 09:56:05 GMT</pubDate><guid isPermaLink="false">bce7ef4a-1ab4-4a64-ae34-bb54d1362c7e:57415</guid><dc:creator>James Newton-King</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;strong&gt;DefaultSettings&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you have used Json.NET then you will be familiar with JsonSerializerSettings. This class has been an extremely successful at providing an simple way for developers to customize Json.NET.&lt;/p&gt;  &lt;p&gt;With Json.NET’s increasing popularity and its use by more third party frameworks, a problem I have noticed is a developer has to customize serializer settings in multiple places. If you want your HtmlHelper.ToJson extension method, Web API services and SignalR to serialize JSON the same way across an application then you have to manually share a JsonSerializerSettings instance between them and figure out how each different framework allows you to customize Json.NET.&lt;/p&gt;  &lt;p&gt;The solution I have come up with is to add global default settings. Set once with JsonConvert.DefaultSettings in an application, the default settings will automatically be used by all calls to JsonConvert.SerializeObject/DeserializeObject, and JToken.ToObject/FromObject. Any user supplied settings to these calls will override the default settings.&lt;/p&gt;  &lt;div class="overflowpanel"&gt;   &lt;div class="code"&gt;     &lt;div style="font-size:10pt;font-family:courier new;color:black;"&gt;       &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// settings will automatically be used by JsonConvert.SerializeObject/DeserializeObject&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;JsonConvert&lt;/span&gt;.DefaultSettings = () =&amp;gt; &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;JsonSerializerSettings&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; {&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; Formatting = &lt;span style="color:#2b91af;"&gt;Formatting&lt;/span&gt;.Indented,&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; ContractResolver = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;CamelCasePropertyNamesContractResolver&lt;/span&gt;()&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; };&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;Employee&lt;/span&gt; e = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Employee&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; {&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; FirstName = &lt;span style="color:#a31515;"&gt;&amp;quot;Eric&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; LastName = &lt;span style="color:#a31515;"&gt;&amp;quot;Example&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; BirthDate = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DateTime&lt;/span&gt;(1980, 4, 20, 0, 0, 0, &lt;span style="color:#2b91af;"&gt;DateTimeKind&lt;/span&gt;.Utc),&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; Department = &lt;span style="color:#a31515;"&gt;&amp;quot;IT&amp;quot;&lt;/span&gt;,&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; JobTitle = &lt;span style="color:#a31515;"&gt;&amp;quot;Web Dude&amp;quot;&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; };&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; json = &lt;span style="color:#2b91af;"&gt;JsonConvert&lt;/span&gt;.SerializeObject(e);&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// {&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;//&amp;#160;&amp;#160; &amp;quot;firstName&amp;quot;: &amp;quot;Eric&amp;quot;,&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;//&amp;#160;&amp;#160; &amp;quot;lastName&amp;quot;: &amp;quot;Example&amp;quot;,&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;//&amp;#160;&amp;#160; &amp;quot;birthDate&amp;quot;: &amp;quot;1980-04-20T00:00:00Z&amp;quot;,&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;//&amp;#160;&amp;#160; &amp;quot;department&amp;quot;: &amp;quot;IT&amp;quot;,&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;//&amp;#160;&amp;#160; &amp;quot;jobTitle&amp;quot;: &amp;quot;Web Dude&amp;quot;&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// }&lt;/span&gt;&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Because there are cases where JSON should not be customized, e.g. a Facebook or Twitter library, by default JsonSerializer won’t use DefaultSettings, providing an opt-out for those frameworks or for places in your application that shouldn’t use default settings. To create a JsonSerializer that does use them there is a new JsonSerializer.CreateDefault() method.&lt;/p&gt;

&lt;p&gt;In the short term there will be some third party libraries that don’t use default settings that should, and some third party libraries that do use default settings that shouldn’t. If you encounter a situation where DefaultSettings doesn’t work for you then continue to customize Json.NET settings like you do today.&lt;/p&gt;

&lt;p&gt;In the long term DefaultSettings will hopefully provide a simple, standard way to developers to customize JSON in .NET applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Extension Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The second new feature in Json.NET 5.0 Release 5 is &lt;strike&gt;copied&lt;/strike&gt; inspired by WCF’s &lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.serialization.iextensibledataobject.aspx" target="_blank"&gt;IExtensibleDataObject&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Extension data is a JSON object’s values that aren’t matched to a .NET property during deserialization. By placing the JsonExtensionDataAttribute on a dictionary all unused values are automatically added to that dictionary and are accessible by you.&lt;/p&gt;

&lt;div class="overflowpanel"&gt;
  &lt;div class="code"&gt;
    &lt;div style="font-size:10pt;font-family:courier new;color:black;"&gt;
      &lt;pre style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DirectoryAccount&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;{&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; &lt;span style="color:green;"&gt;// normal deserialization&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; DisplayName { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; &lt;span style="color:green;"&gt;// these properties are set in OnDeserialized&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; UserName { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Domain { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; [&lt;span style="color:#2b91af;"&gt;JsonExtensionData&lt;/span&gt;]&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;IDictionary&lt;/span&gt;&amp;lt;&lt;span style="color:blue;"&gt;string&lt;/span&gt;, &lt;span style="color:#2b91af;"&gt;JToken&lt;/span&gt;&amp;gt; _additionalData;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; [&lt;span style="color:#2b91af;"&gt;OnDeserialized&lt;/span&gt;]&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; OnDeserialized(&lt;span style="color:#2b91af;"&gt;StreamingContext&lt;/span&gt; context)&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; {&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;// SAMAccountName is not deserialized to any property&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:green;"&gt;// and so it is added to the extension data dictionary&lt;/span&gt;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color:blue;"&gt;string&lt;/span&gt; samAccountName = (&lt;span style="color:blue;"&gt;string&lt;/span&gt;)_additionalData[&lt;span style="color:#a31515;"&gt;&amp;quot;SAMAccountName&amp;quot;&lt;/span&gt;];&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; Domain = samAccountName.Split(&lt;span style="color:#a31515;"&gt;&amp;#39;\\&amp;#39;&lt;/span&gt;)[0];&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160;&amp;#160;&amp;#160; UserName = samAccountName.Split(&lt;span style="color:#a31515;"&gt;&amp;#39;\\&amp;#39;&lt;/span&gt;)[1];&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;&amp;#160; }&lt;/pre&gt;

      &lt;pre style="margin:0px;"&gt;}&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Changes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is a complete list of what has changed since Json.NET 5.0 Release 4.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;New feature – Added global default serialization settings with JsonConvert.DefaultSettings&lt;/li&gt;

  &lt;li&gt;New feature – Added extension data support with JsonExtensionDataAttribute&lt;/li&gt;

  &lt;li&gt;New feature – Added NullValueHandling and DefaultValueHandling support to serializing dynamic types&lt;/li&gt;

  &lt;li&gt;Change – Changed some explicit interface methods on JArray to public to support use with ImpromtuInterface&lt;/li&gt;

  &lt;li&gt;Fix – Fixed deserializing non-ISO formatted date dictionary keys&lt;/li&gt;

  &lt;li&gt;Fix – Fixed values not being set when deserializing with DefaultValueHandling.IgnoreAndPopulate&lt;/li&gt;

  &lt;li&gt;Fix – Fixed deserializing with type named handling and assemblies loaded with Assembly.LoadFrom&lt;/li&gt;

  &lt;li&gt;Fix - Fixed deserializing Regexes when using StringEnumConverter&lt;/li&gt;

  &lt;li&gt;Fix – Fixed serializing and deserializing typed DataSets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://json.codeplex.com/"&gt;&lt;strong&gt;Json.NET CodePlex Project&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://json.codeplex.com/releases/view/106328"&gt;Json.NET 5.0 Release 5 Download&lt;/a&gt;&lt;/strong&gt; – Json.NET source code and assemblies&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://james.newtonking.com/aggbug.aspx?PostID=57415" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/jamesnewtonking/~4/LBPwcLtIPQU" height="1" width="1"/&gt;</description><category domain="http://james.newtonking.com/archive/tags/.NET/default.aspx">.NET</category><category domain="http://james.newtonking.com/archive/tags/Json.NET/default.aspx">Json.NET</category><category domain="http://james.newtonking.com/archive/tags/Project/default.aspx">Project</category><feedburner:origLink>http://james.newtonking.com/archive/2013/05/08/json-net-5-0-release-5-defaultsettings-and-extension-data.aspx</feedburner:origLink></item><item><title>Json.NET 5.0 Release 4 – Performance</title><link>http://feeds.newtonking.com/~r/jamesnewtonking/~3/oH4PMMYLsi0/json-net-5-0-release-4-performance.aspx</link><pubDate>Thu, 25 Apr 2013 08:24:18 GMT</pubDate><guid isPermaLink="false">bce7ef4a-1ab4-4a64-ae34-bb54d1362c7e:57414</guid><dc:creator>James Newton-King</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This release of Json.NET ships with many performance improvements, and is over 30% faster serializing and deserializing JSON compared to Json.NET 4.5.&lt;/p&gt;  &lt;p&gt;&lt;img title="Smithers, release the hounds." style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="Smithers, release the hounds." src="http://james.newtonking.com/images/jsonnet50performance.png" width="661" height="356" /&gt;&lt;/p&gt;  &lt;p&gt;Json.NET extends its performance lead over DataContractJsonSerializer and continues to be significantly faster than JavaScriptSerializer which is used by ASP.NET MVC.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Compiled Expressions on Windows 8 and Windows Phone 8&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;An additional performance improvement specific to Windows 8 and Windows Phone 8 is the switch from the serializer internally using latebound reflection to compiled expressions. In exchange for a small one off cost the first time a type is serialized, compiled expressions are considerably faster than latebound reflection and provide an additional speed boost to Json.NET on Win8 and WP8.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Changes&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Here is a complete list of what has changed since Json.NET 5.0 Release 1.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;New feature - Added JsonWriter.SetWriteState to support inheritance from JsonWriter implementations &lt;/li&gt;    &lt;li&gt;Change - Changed .NET 4.5 portable library and WinRT library to use compiled expressions reflection &lt;/li&gt;    &lt;li&gt;Fix - Fixed error serializing non-generic types that implement IEnumerable&amp;lt;T&amp;gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://json.codeplex.com/"&gt;&lt;strong&gt;Json.NET CodePlex Project&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="https://json.codeplex.com/releases/view/105633"&gt;Json.NET 5.0 Release 4 Download&lt;/a&gt;&lt;/strong&gt; – Json.NET source code and assemblies&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://james.newtonking.com/aggbug.aspx?PostID=57414" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/jamesnewtonking/~4/oH4PMMYLsi0" height="1" width="1"/&gt;</description><category domain="http://james.newtonking.com/archive/tags/.NET/default.aspx">.NET</category><category domain="http://james.newtonking.com/archive/tags/Json.NET/default.aspx">Json.NET</category><category domain="http://james.newtonking.com/archive/tags/Project/default.aspx">Project</category><feedburner:origLink>http://james.newtonking.com/archive/2013/04/25/json-net-5-0-release-4-performance.aspx</feedburner:origLink></item><item><title>Json.NET 5.0 Release 1 – .NET 4.5, BigInteger, Read-Only Collections</title><link>http://feeds.newtonking.com/~r/jamesnewtonking/~3/Qtdn9wEA0H8/json-net-5-0-release-1-net-4-5-biginteger-read-only-collections.aspx</link><pubDate>Sun, 07 Apr 2013 07:13:00 GMT</pubDate><guid isPermaLink="false">bce7ef4a-1ab4-4a64-ae34-bb54d1362c7e:57413</guid><dc:creator>James Newton-King</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;strong&gt;New and Updated Libraries&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In Json.NET 5.0 there are a bunch of library version changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Added .NET 4.5 library&lt;/li&gt;
&lt;li&gt;Added portable library targeting .NET 4.5 + WP8 + Win8&lt;/li&gt;
&lt;li&gt;Removed the Silverlight library&lt;a href="http://www.youtube.com/watch?v=r0yXqU-w9U0" target="_blank"&gt;.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Removed the Windows Phone library&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Upgrading library versions allows Json.NET to support new .NET features such as dynamic and async across more platforms.&lt;/p&gt;
&lt;p&gt;A baseline portable class library still supports all platforms (.NET 4 + WP7 + SL5 + Win8) so have no fear &amp;nbsp;Silverlight and Windows Phone developers, even though the dedicated libraries have been removed you can continue use the latest version of Json.NET on Silverlight/Windows Phone with a portable class library.&lt;/p&gt;
&lt;p&gt;Note that the assembly version number of Json.NET 5.0 hasn&amp;#39;t changed and is still 4.5.0.0 to avoid assembly redirect issues. Read more about assembly version numbers &lt;a href="http://james.newtonking.com/archive/2012/04/04/json-net-strong-naming-and-assembly-version-numbers.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Serializing NaN and Infinity Floating Point Values&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Json.NET no longer serializes NaN and positive and negative infinity floating point values as symbols, which is invalid JSON. With 5.0 the new default is to serialize those values as strings, e.g. &amp;quot;NaN&amp;quot; instead of NaN. There is no change to serializing normal floating point numbers.&lt;/p&gt;
&lt;p&gt;A FloatFormatHandling setting has been added so you can control how NaN and infinity values are serialized.&lt;/p&gt;
&lt;div class="overflowpanel"&gt;
&lt;div class="code"&gt;
&lt;div style="font-size:10pt;font-family:courier new;color:black;"&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; json;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;IList&lt;/span&gt;&amp;lt;&lt;span style="color:blue;"&gt;double&lt;/span&gt;&amp;gt; d = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color:blue;"&gt;double&lt;/span&gt;&amp;gt; {1.1, &lt;span style="color:blue;"&gt;double&lt;/span&gt;.NaN, &lt;span style="color:blue;"&gt;double&lt;/span&gt;.PositiveInfinity};&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;json = &lt;span style="color:#2b91af;"&gt;JsonConvert&lt;/span&gt;.SerializeObject(d);&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// [1.1,&amp;quot;NaN&amp;quot;,&amp;quot;Infinity&amp;quot;]&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;json = &lt;span style="color:#2b91af;"&gt;JsonConvert&lt;/span&gt;.SerializeObject(d, &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;JsonSerializerSettings&lt;/span&gt; {FloatFormatHandling = &lt;span style="color:#2b91af;"&gt;FloatFormatHandling&lt;/span&gt;.Symbol});&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// [1.1,NaN,Infinity]&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;json = &lt;span style="color:#2b91af;"&gt;JsonConvert&lt;/span&gt;.SerializeObject(d, &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;JsonSerializerSettings&lt;/span&gt; {FloatFormatHandling = &lt;span style="color:#2b91af;"&gt;FloatFormatHandling&lt;/span&gt;.DefaultValue});&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// [1.1,0.0,0.0]&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;BigInteger and Read-Only Collections&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Json.NET 5.0 adds support for BigInteger. Now when reading and writing JSON there is no limit on the maximum size of integers Json.NET can handle.&lt;/p&gt;
&lt;p&gt;There is also support for read-only collection interfaces (IReadOnlyList&amp;lt;T&amp;gt; and IReadOnlyDictionary&amp;lt;TKey, TValue&amp;gt;) which were added in .NET 4.5. As long as there is an IEnumerable&amp;lt;T&amp;gt; constructor then Json.NET will deserialize to the read-only collection for you.&lt;/p&gt;
&lt;div class="overflowpanel"&gt;
&lt;div class="code"&gt;
&lt;div style="font-size:10pt;font-family:courier new;color:black;"&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; json = &lt;span style="color:#a31515;"&gt;@&amp;quot;[&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:#a31515;"&gt;&amp;nbsp; 9000000000000000000000000000000000000000000000001&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:#a31515;"&gt;]&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:blue;"&gt;var&lt;/span&gt; l = &lt;span style="color:#2b91af;"&gt;JsonConvert&lt;/span&gt;.DeserializeObject&amp;lt;&lt;span style="color:#2b91af;"&gt;IReadOnlyList&lt;/span&gt;&amp;lt;&lt;span style="color:#2b91af;"&gt;BigInteger&lt;/span&gt;&amp;gt;&amp;gt;(json);&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:#2b91af;"&gt;BigInteger&lt;/span&gt; nineQuindecillionAndOne = l[0];&lt;/pre&gt;
&lt;pre style="margin:0px;"&gt;&lt;span style="color:green;"&gt;// 9000000000000000000000000000000000000000000000001&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
&lt;p&gt;&lt;strong&gt;&lt;b&gt;Performance&lt;/b&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are many performance and memory improvements in Json.NET 5.0, especially when serializing and deserializing collections, and Json.NET in Windows 8 Store apps.&lt;/p&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is a complete list of what has changed since Json.NET 4.5 Release 11.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New feature - Added .NET 4.5 library &lt;/li&gt;
&lt;li&gt;New feature - Added portable library targeting .NET 4.5, Win8, WP8 &lt;/li&gt;
&lt;li&gt;New feature - Added Path to JToken &lt;/li&gt;
&lt;li&gt;New feature - Added BigInteger support &lt;/li&gt;
&lt;li&gt;New feature - Added IReadOnlyCollection&amp;lt;T&amp;gt; and IReadOnlyDictionary&amp;lt;TKey, TValue&amp;gt; support &lt;/li&gt;
&lt;li&gt;New feature - Added FloatFormatHandling to JsonWriter/JsonSerializer/JsonSerializerSettings &lt;/li&gt;
&lt;li&gt;New feature - Added DateFormatString to JsonWriter/JsonSerializer/JsonSerializerSettings &lt;/li&gt;
&lt;li&gt;New feature - Added support for multiple serialization events and use base type serialization events &lt;/li&gt;
&lt;li&gt;New feature - Added DeserializeAnonymousType overload with JsonSerializerSettings &lt;/li&gt;
&lt;li&gt;New feature - Added support for specifying root type when serializing JSON with TypeNameHandling.Auto &lt;/li&gt;
&lt;li&gt;New feature - Added support for creating lists and dictionaries with an IEnumerable&amp;lt;T&amp;gt; constructor &lt;/li&gt;
&lt;li&gt;New feature - Added IConvertible support to JValue &lt;/li&gt;
&lt;li&gt;New feature - Added support for serializing custom IConvertible values &lt;/li&gt;
&lt;li&gt;New feature - Added support for deserializing IList &lt;/li&gt;
&lt;li&gt;New feature - Added support for converting byte array JValues to Guid &lt;/li&gt;
&lt;li&gt;New feature - Added support for deserializing byte arrays to Guid &lt;/li&gt;
&lt;li&gt;Change - NaN and Infinity floating point values are serialized as strings by default &lt;/li&gt;
&lt;li&gt;Change - Minor breaking changes to JsonSchema type &lt;/li&gt;
&lt;li&gt;Change - Upgraded Windows Phone assembly to WP8 &lt;/li&gt;
&lt;li&gt;Change - DateTime IDictionary keys are now serialized in ISO date format &lt;/li&gt;
&lt;li&gt;Change - DataContractAttribute is no longer inherited to match DataConctractSerializer behavior &lt;/li&gt;
&lt;li&gt;Change - StringEnumConverter converts empty strings to null for nullable enums &lt;/li&gt;
&lt;li&gt;Change - Guids serialize to a binary UUID in BSON instead of a string &lt;/li&gt;
&lt;li&gt;Remove - Removed SL4 library &lt;/li&gt;
&lt;li&gt;Remove - Removed WP7 library&lt;/li&gt;
&lt;li&gt;Fix - Fixed JTokenWriter returning a null reference &lt;/li&gt;
&lt;li&gt;Fix - Fixed static fields to no longer be included with fields serialization &lt;/li&gt;
&lt;li&gt;Fix - Fixed recursively reading type wrapper objects when deserializing &lt;/li&gt;
&lt;li&gt;Fix - Fixed incorrect namespace when converting XML to JSON &lt;/li&gt;
&lt;li&gt;Fix - Fixed poor performance when serializing/deserialize dynamic objects &lt;/li&gt;
&lt;li&gt;Fix - Fixed StringEnumConverter to throw JsonSerializerException on error &lt;/li&gt;
&lt;li&gt;Fix - Fixed hidden properties not being serialized &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://json.codeplex.com/" target="_blank"&gt;&lt;strong&gt;Json.NET CodePlex Project&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://json.codeplex.com/releases/view/104679" target="_blank"&gt;&lt;strong&gt;Json.NET 5.0 Release 1 Download&lt;/strong&gt;&lt;/a&gt; &amp;ndash; Json.NET source code and assemblies&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://james.newtonking.com/aggbug.aspx?PostID=57413" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/jamesnewtonking/~4/Qtdn9wEA0H8" height="1" width="1"/&gt;</description><category domain="http://james.newtonking.com/archive/tags/.NET/default.aspx">.NET</category><category domain="http://james.newtonking.com/archive/tags/Json.NET/default.aspx">Json.NET</category><category domain="http://james.newtonking.com/archive/tags/Project/default.aspx">Project</category><feedburner:origLink>http://james.newtonking.com/archive/2013/04/07/json-net-5-0-release-1-net-4-5-biginteger-read-only-collections.aspx</feedburner:origLink></item><item><title>Monitoring Windows Azure with Foglight</title><link>http://feeds.newtonking.com/~r/jamesnewtonking/~3/OHj29CRFB98/monitoring-windows-azure-with-foglight.aspx</link><pubDate>Sat, 08 Dec 2012 22:00:00 GMT</pubDate><guid isPermaLink="false">bce7ef4a-1ab4-4a64-ae34-bb54d1362c7e:57412</guid><dc:creator>James Newton-King</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I do a lot of &lt;a target="_blank" href="http://www.azure.com/"&gt;Azure&lt;/a&gt; development. While it is a great platform for setting up new environments, scaling instances and simple deployments; monitoring applications in Azure is difficult. It is a remote environment and because of the way Azure abstracts hosting for you there is no option to install your own software on the server.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://foglight-on-demand.com/"&gt;Foglight for Azure Apps&lt;/a&gt; is a hosted service that sets up gathering information from Windows Azure for you. In this blog post I&amp;#39;m going to try out Foglight with a demo application I&amp;#39;ve put together for simulating a broken website (demo source code available at the end of the blog post).&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="360" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/jsonformat.png" alt="jsonformat" title="jsonformat" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Setting up Foglight for Azure Apps is really simple. Foglight has two configuration methods for adding an Azure deployment: manual configuration where you manually add details about each deployment you want to monitor, and automatic discovery where Foglight retrieves that information from Azure for you. I&amp;#39;m going to step through using the automatic discovery wizard.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="338" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/foglightconfigure.png" alt="foglightconfigure" title="foglightconfigure" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;With Foglight automatic discovery the only information you need is your role&amp;rsquo;s Azure Subscription ID. Subscription IDs can be found in the Windows Azure Management Portal by browsing to Settings -&amp;gt; Management Certificates.&lt;/p&gt;
&lt;p&gt;&lt;img width="600" height="198" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/foglightsubscriptionid.png" alt="foglightsubscriptionid" title="foglightsubscriptionid" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;The next step after copy/pasting your Subscription ID is to add a management certificate from Foglight to Azure. The download link for the certificate is in the wizard and it is uploaded in the same place where you got your Subscription ID.&lt;/p&gt;
&lt;p&gt;&lt;img width="300" height="210" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/foglightcertificate.png" alt="foglightcertificate" title="foglightcertificate" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;Finally select the deployment you want to monitor and you&amp;rsquo;re finished.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="340" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/foglightconfigurationcomplete.png" alt="foglightconfigurationcomplete" title="foglightconfigurationcomplete" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;img width="500" height="410" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/foglightdashboard.png" alt="foglightdashboard" title="foglightdashboard" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The core of Foglight for Azure Apps are the monitors it provides to measure the health of your application. The first page you&amp;rsquo;ll come upon after setup is the dashboard which provides a nice summary of the state of your application. From this screen or from the menu you can drill into more detail about each monitor.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="360" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/availability.png" alt="availability" title="availability" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;The availability page shows you whether your application is accessible from various locations around the world &amp;ndash; useful for times when a user or users from a country report they can&amp;rsquo;t access your application. In the screenshot above I&amp;#39;ve activated server errors on my demo website which you can see showing up in orange in the availability graphs.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="256" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/health.png" alt="health" title="health" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;The health page lets you view health details about individual rolls in your application. Here you can see details like CPU, memory and disk usage, and HTTP traffic and bandwidth being used by each role. One nice feature here is Foglight aggregates everything together and provides an indication of whether the application is healthy or not. Seeing the health of an application in a graph over time lets you match user reported errors with past server problems. In the screenshot above I&amp;#39;ve active high CPU and memory usage in my demo application.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="244" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/services.png" alt="services" title="services" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;The services page shows the status of the Windows Azure services your application depends on (e.g. compute, databases, storage) in your application&amp;#39;s region and the status of worldwide services (e.g. management portal, CDN). This is a useful tool when debugging a broken application to double check whether the issue is yours or is being caused by a problem in Azure infrastructure.&lt;/p&gt;
&lt;p&gt;&lt;img width="600" height="132" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/topurls.png" alt="topurls" title="topurls" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;The top URLs page shows what URLs in an application are creating problems. URLs can either be the slowest pages in your application or the pages with the highest number of 404 and server errors.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configuring Health and Alerts&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An awesome feature of Foglight is the control you have over configuring health thresholds and sending alerts.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="275" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/configurehealth.png" alt="configurehealth" title="configurehealth" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;Once you&amp;#39;re happy with the health thresholds (the screenshot above shows the default) you can then configure at what health level alerts should be emailed and who they should be emailed to.&lt;/p&gt;
&lt;p&gt;Health alerts are one of the most important features when monitoring, letting you know about problems as soon as they happen rather than waiting until someone look at Foglight or hear about errors from your users.&lt;/p&gt;
&lt;p&gt;One thing I&amp;rsquo;ve done in the past with errors is to send an SMS message to my phone. Foglight doesn&amp;rsquo;t have built in SMS support but it is simple to set up using &lt;a target="_blank" href="https://ifttt.com/"&gt;IFTTT&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img width="500" height="254" border="0" src="http://james.newtonking.com/images/Monitoring-Windows-Azure-with-Foglight_8FC8/ifttt.png" alt="ifttt" title="ifttt" style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Wrapping Up&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I found Foglight&amp;#39;s monitoring easy to understand and fast to update. Really impressive is how simple Foglight is to setup, taking just a couple of minutes and requiring no changes to your application. Finally the Foglight&amp;rsquo;s health alerts will ensure you know about critical issues as they happen.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re deploying applications to Azure and it is important they are rock solid then I recommend you check &lt;a target="_blank" href="http://foglight-on-demand.com/"&gt;Foglight for Azure Apps&lt;/a&gt; out.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a target="_blank" href="http://james.newtonking.com/downloads/foglight/jsonformat.zip"&gt;Click here to download the Windows Azure JsonFormat application source code&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the Federal Trade Commission&amp;rsquo;s 16 CFR, Part 255: &lt;/i&gt;&lt;a href="http://www.access.gpo.gov/nara/cfr/waisidx_03/16cfr255_03.html"&gt;&lt;i&gt;Guides Concerning the Use of Endorsements and Testimonials in Advertising.&lt;/i&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://james.newtonking.com/aggbug.aspx?PostID=57412" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/jamesnewtonking/~4/OHj29CRFB98" height="1" width="1"/&gt;</description><category domain="http://james.newtonking.com/archive/tags/.NET/default.aspx">.NET</category><feedburner:origLink>http://james.newtonking.com/archive/2012/12/08/monitoring-windows-azure-with-foglight.aspx</feedburner:origLink></item></channel></rss>
