<?xml-stylesheet type="text/xsl" href="/rss.xsl" media="screen"?><rss version="2.0"><channel><title>softlogger Latest Articles ::main_feed</title><link>http://softlogger.com</link><description>softlogger Latest Articles ::main_feed</description><ttl>180</ttl><item><title>A future world without the SQL Server Image/Text/NText data types. Now's the time to start planning for that future...</title><link>http://softlogger.com/20584/DatabaseSQL/a-future-world-without-the-sql-server-image-text-ntext-data-types-now-s-the-time-to-start-planning-for-that-future-.aspx</link><description>&lt;a href="http://blogs.technet.com/josebda/default.aspx"&gt;Jose Barreto's Blog&lt;/a&gt; - &lt;a href="http://blogs.technet.com/josebda/archive/2008/03/17/sql-server-2008-and-unstructured-data.aspx"&gt;SQL Server 2008 and Unstructured Data&lt;/a&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;SQL Server 2008 introduces two new options to store unstructured data, in addition to the current BLOB support we have in SQL Server 2005. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;IMAGE&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;Back in SQL Server 2000 and SQL Server 7 days, we used the IMAGE data type to store binary large objects (a.k.a. BLOBs). Large, by the way, is defined as anything that would not fit a SQL Server data page (around 8,000 bytes). This data type is still present in SQL Server 2005 today, &lt;strong&gt;but it should be going away soon.&lt;/strong&gt; &lt;strong&gt;The current recommendation is to &amp;#8220;avoid using these data types in new development work, and plan to modify applications that currently use them.&amp;#8221;&lt;/strong&gt;&amp;#160; &lt;strong&gt;This applies also to the similar TEXT and NTEXT data types.&lt;/strong&gt; [GD: Emphasis added]&lt;/p&gt;    &lt;p&gt;This is described in more detail at &lt;a href="http://msdn2.microsoft.com/en-us/library/ms187993.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms187993.aspx&lt;/a&gt;. &lt;/p&gt;    &lt;p&gt;&lt;strong&gt;VARBINARY&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;To replace those, SQL Server 2005 introduced the concept of using the VARBINARY(MAX) data type....&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;FILESTREAM&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;A new option in SQL Server 2008 is to use a FILESTREAM attribute in a VARBINARY column. This allows you to store the actual data on the server&amp;#8217;s file system...&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;RBS&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;SQL Server 2008 also introduces a new client-side API that allows for storing BLOBs on a Remote BLOB store (RBS). &lt;/p&gt;    &lt;p&gt;...&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="Important:  "&gt;SQL Server 2005 Books Online (September 2007)&lt;/a&gt; - &lt;a href="http://msdn2.microsoft.com/en-us/library/ms187993.aspx"&gt;ntext, text, and image (Transact-SQL)&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;&lt;strong&gt;Important&lt;/strong&gt;: &lt;/p&gt;    &lt;p&gt;&lt;b&gt;ntext&lt;/b&gt;, &lt;b&gt;text&lt;/b&gt;, and &lt;b&gt;image&lt;/b&gt; data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use &lt;a href="http://msdn2.microsoft.com/en-us/library/ms186939.aspx"&gt;nvarchar(max)&lt;/a&gt;, &lt;a href="http://msdn2.microsoft.com/en-us/library/ms176089.aspx"&gt;varchar(max)&lt;/a&gt;, and &lt;a href="http://msdn2.microsoft.com/en-us/library/ms188362.aspx"&gt;varbinary(max)&lt;/a&gt; instead. For more information, see &lt;a href="http://msdn2.microsoft.com/en-us/library/ms178158.aspx"&gt;Using Large-Value Data Types&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;...&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;We've been warned. SQL Server 2011 without the Image/Text/NText data types? Could be...&lt;/p&gt;  &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=jKQ8yUF"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=jKQ8yUF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=xQUiLPF"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=xQUiLPF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=NbCXwyF"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=NbCXwyF" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/coolthingoftheday/~4/253681586" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20584"&gt;</description><author>Gregs Cool [Insert Clever Name] of the Day</author><pubDate>2008-03-23T00:00:00</pubDate><category>Database,SQL</category></item><item><title>Things in Metadata that are missing in Reflection</title><link>http://softlogger.com/20313/Design-Architecture/things-in-metadata-that-are-missing-in-reflection.aspx</link><description>&lt;p&gt;System.Reflection is a high-level way of &lt;a href="http://blogs.msdn.com/jmstall/archive/2007/03/15/describing-types-in-net.aspx"&gt;describing Types in .NET&lt;/a&gt; targetted at managed code consumers. The API is easy to use, but does not expose all the information that's actually present and affecting decisions.&lt;/p&gt; &lt;p&gt;For example, Reflection does not expose &lt;a href="http://blogs.msdn.com/jmstall/archive/2007/03/23/typedef-vs-typeref.aspx"&gt;TypeRef&lt;/a&gt;, MemberRef, AssemblyRef, or other Ref tokens.&amp;nbsp; These tokens are references to things in other assemblies. Reflection just resolves them for you (potentially invoking an event to get help from your app) and hands back the resolved object.&lt;/p&gt; &lt;p&gt;Similarly, reflection is also missing TypeSpecs. TypeSpecs are just binary signature blobs that describe compound types (arrays, generics, etc). Reflection will parse&amp;nbsp; the blob and resolve it to a real System.Type. &lt;/p&gt; &lt;p&gt;This entry is not a complete list of all things missing in reflection; nor am I going to get into the other problems in reflection here. For now, I'll just look at TypeRefs...&lt;/p&gt; &lt;p&gt;Imagine you have a class that inherits from a type in another assembly. At the metadata level, the base type is described with a TypeRef token. &lt;/p&gt; &lt;p&gt;1. Practically, that means you could use reflection to inspect what a base type &lt;em&gt;actually&lt;/em&gt; bound to,&amp;nbsp; but not what it was &lt;em&gt;supposed&lt;/em&gt; to bind to (as described in the original assemblyRef).&lt;/p&gt; &lt;p&gt;2. Another issue is that when you have a high-level API (Reflection) that loses information over a low level API (IMetadataImport), you risk that the high-level API won't be able to talk to the low level API because it may not be able to provide it with the information the low level API requests. &lt;/p&gt; &lt;p&gt;3. In related trivia, ILDasm can print TypeRef, TypeSpec tokens:&lt;/p&gt; &lt;p&gt;//000010:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Hi!" + arg);&lt;br&gt;&amp;nbsp; IL_0001:&amp;nbsp; ldstr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Hi!" /* 70000001 */&lt;br&gt;&amp;nbsp; IL_0006:&amp;nbsp; ldarg.0&lt;br&gt;&amp;nbsp; IL_0007:&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string [mscorlib/*23000001*/]System.String/*&lt;strong&gt;01000012&lt;/strong&gt;*/::Concat(string,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string) /* 0A000010 */&lt;br&gt;&amp;nbsp; IL_000c:&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void [mscorlib/*23000001*/]System.Console/*&lt;strong&gt;01000013&lt;/strong&gt;*/::WriteLine(string) /* 0A000011 */&lt;br&gt;&amp;nbsp; IL_0011:&amp;nbsp; nop &lt;p&gt;So the inability to get the raw unresolved tokens from Reflection would prevent you from writing ILDasm on reflection that could print the above snippet.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8218761" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20313"&gt;</description><author>Mike Stalls blog                                                                                    </author><pubDate>2008-03-15T00:00:00</pubDate><category>Design, Architecture</category></item><item><title>ASP.NET Case Study: Hang on WaitOne, WaitAny or WaitMultiple</title><link>http://softlogger.com/20354/Web-Service/asp-net-case-study-hang-on-waitone-waitany-or-waitmultiple.aspx</link><description>&lt;p&gt;One of the synchronization methods in .NET is the ResetEvent.&amp;nbsp; It comes in two flavors, the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.threading.autoresetevent.aspx"&gt;AutoResetEvent&lt;/a&gt; which resets itself immediately after it is set, and the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.threading.manualresetevent.aspx"&gt;ManualResetEvent&lt;/a&gt; which as the name suggests you have to manually reset.&lt;/p&gt; &lt;p&gt;Lets say you have a team of developers&amp;nbsp;that can implement different parts of an application simultaneously without interaction, then the work order might look something like this&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Ask Bob to implement X  &lt;li&gt;Ask Belinda to implement Y  &lt;li&gt;Ask Ben to implement Z  &lt;li&gt;Integrate X, Y and Z when you get a notification that they are done with their work&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;In code (using a reset event) this would look something like this&lt;/p&gt;&lt;pre class="code"&gt;ImplementApp(){
  	ImplementX();			//spawns off implementation of X on another thread, signals when ready
	ImplementY();			//spawns off implementation of Y on another thread, signals when ready
	ImplementZ();			//spawns off implementation of Z on another thread, signals when ready
	WaitHandle.WaitAll(autoEvents);
	IntegrateXYandZ();		//uses the results of the Imlement methods
}&lt;/pre&gt;
&lt;p&gt;The ImplementX, Y and Z methods would then use QueueUserWorkItem to get the work scheduled to other threads and when done they would do autoEvents[i].Set() to signal that they are ready.&lt;/p&gt;
&lt;p&gt;When you call a web service for example, internally it will spawn up a thread that sits and waits for the results from the web service call and when it is done the original thread will be signalled and can continue with its work.&amp;nbsp; You can see an example of how this looks &lt;a href="http://blogs.msdn.com/tess/archive/2006/02/23/537681.aspx"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another&amp;nbsp;common use for the autoresetevents and manualresetevents is to spawn a thread that just sits around for the lifetime of the process waiting for&amp;nbsp;certain&amp;nbsp;events to happen&amp;nbsp;and act on them when they occurr.&amp;nbsp; If you look at a dump you will often see threads sitting in WaitOne waiting for some event to happen like this one:&lt;/p&gt;&lt;pre class="debug"&gt;ESP EIP 
0x0109fb74 0x7c82ed54 [FRAME: ECallMethodFrame] [DEFAULT] Boolean System.Threading.WaitHandle.WaitOneNative(I,UI4,Boolean)
0x0109fb88 0x799e4bb1 [DEFAULT] [hasThis] Boolean System.Threading.WaitHandle.WaitOne(I4,Boolean)
0x0109fbbc 0x01040fcf [DEFAULT] Void System.EnterpriseServices.ServicedComponentProxy.QueueCleaner()
0x0109fdc4 0x791b3208 [FRAME: GCFrame] 
&lt;/pre&gt;
&lt;p&gt;This is perfectly normal,&amp;nbsp; the QueueCleaner here just sits there waiting for someone to signal that the Queue needs cleaning so it&amp;nbsp;isn't hanging by any means, it is just waiting on an event. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Going back to the initial example, what would happen if Ben quit work without telling anyone, before he is done with his implementation of Z?&amp;nbsp; In real-life you would probably be worried if he didn't&amp;nbsp;come to work for a few days and assign the work to someone else, but in an application&amp;nbsp;noone would be the wiser and the app would be&amp;nbsp;hung, waiting indefinitely for WaitHandle.WaitAll(autoEvents).&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Debugging the issue:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For demo purposes I have implemented the&amp;nbsp;Calculate example show in the MSDN help files for &lt;a href="http://msdn2.microsoft.com/en-us/library/system.threading.autoresetevent.aspx"&gt;AutoResetEvent&lt;/a&gt;&amp;nbsp;but added a little bit of a twist to it (as you'll see later) so my application hung.&amp;nbsp;&amp;nbsp;I then grabbed a hang dump with adplus -hang -pn w3wp.exe, loaded up sos&amp;nbsp;and ran ~* e !clrstack.&lt;/p&gt;
&lt;p&gt;Most threads were sitting&amp;nbsp;in this stack:&lt;/p&gt;&lt;pre class="debug"&gt;OS Thread Id: 0x1e58 (26)
ESP       EIP     
0f2cefb0 7d61d051 [HelperMethodFrame_1OBJ: 0f2cefb0] System.Threading.WaitHandle.WaitMultiple(System.Threading.WaitHandle[], Int32, Boolean, Boolean)
&lt;strong&gt;0f2cf07c 7940332b System.Threading.WaitHandle.WaitAll(System.Threading.WaitHandle[], Int32, Boolean)
&lt;/strong&gt;0f2cf098 0f1005a1 Calculate.Result(Int32)
0f2cf0a8 0f10034d _Default.Page_Load(System.Object, System.EventArgs)
0f2cf0d8 66f12980 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr, System.Object, System.Object, System.EventArgs)
0f2cf0e8 6628efd2 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(System.Object, System.EventArgs)
0f2cf0f8 6613cb04 System.Web.UI.Control.OnLoad(System.EventArgs)
0f2cf108 6613cb50 System.Web.UI.Control.LoadRecursive()
0f2cf11c 6614e12d System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)
0f2cf318 6614d8c3 System.Web.UI.Page.ProcessRequest(Boolean, Boolean)
0f2cf350 6614d80f System.Web.UI.Page.ProcessRequest()
0f2cf388 6614d72f System.Web.UI.Page.ProcessRequestWithNoAssert(System.Web.HttpContext)
0f2cf390 6614d6c2 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)
0f2cf3a4 0f100125 ASP.default_aspx.ProcessRequest(System.Web.HttpContext)
0f2cf3a8 65fe6bfb System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
0f2cf3dc 65fe3f51 System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
0f2cf41c 65fe7733 System.Web.HttpApplication+ApplicationStepManager.ResumeSteps(System.Exception)
0f2cf46c 65fccbfe System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(System.Web.HttpContext, System.AsyncCallback, System.Object)
0f2cf488 65fd19c5 System.Web.HttpRuntime.ProcessRequestInternal(System.Web.HttpWorkerRequest)
0f2cf4bc 65fd16b2 System.Web.HttpRuntime.ProcessRequestNoDemand(System.Web.HttpWorkerRequest)
0f2cf4c8 65fcfa6d System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr, Int32)
0f2cf6d8 79f047fd [ContextTransitionFrame: 0f2cf6d8] 
0f2cf70c 79f047fd [GCFrame: 0f2cf70c] 
0f2cf868 79f047fd [ComMethodFrame: 0f2cf868]
&lt;/pre&gt;
&lt;p&gt;So&amp;nbsp;here we can see that we are in _Default.Page_Load, calling Calculate.Result, and this is&amp;nbsp;sitting in a WaitAll waiting for someone to signal&amp;nbsp;a resetEvent&lt;/p&gt;
&lt;p&gt;Here is an excerpt from the code, and we are stuck on the bolded line: &lt;pre class="code"&gt;    public double Result(int seed)
    {
        randomGenerator = new Random(seed);
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateBase));
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateFirstTerm));
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateSecondTerm));
        ThreadPool.QueueUserWorkItem(new WaitCallback(CalculateThirdTerm));
&lt;strong&gt;        WaitHandle.WaitAll(autoEvents);
&lt;/strong&gt;        manualEvent.Reset();

        return firstTerm + secondTerm + thirdTerm;
    }

...

    void CalculateThirdTerm(object stateInfo)
    {
        double preCalc = randomGenerator.NextDouble();
        manualEvent.WaitOne();
        try
        {
            thirdTerm = GetTerm(preCalc);
            autoEvents[2].Set();
        }
        catch { }
    }
&lt;/pre&gt;
&lt;p&gt;For some reason one of the the autoEvents has not been signaled.&amp;nbsp; If it was the fact that we were still working on the calculation in CalculateThirdTerm for example, then we would have seen a thread in ~* e !clrstack that was stuck somewhere in CalculateThirdTerm.&amp;nbsp; This was not the case here which means that the thread must have exited without setting the event, much like our teammate Ben.&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;From the code we can see that one way this could happen would be if some exception occurred in GetTerm such that we exit the try block without setting the event. &lt;/p&gt;
&lt;p&gt;Knowing this I dump out all the recent exceptions in the dump using this command&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;.foreach (ex {!dumpheap -type Exception -short}){!pe ${ex}}&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This goes through all objects on the heap named *Exception* and runs !pe (print exception) on them.&amp;nbsp; &lt;br&gt;&lt;br&gt;Note:&amp;nbsp; If you do this, don't be alarmed if you see an OutOfMemory Exception, a StackOverflowException and an ExecutionEngineException... they will always be there since the exception objecst for these exceptions are created on startup since you can't create them when you throw them.&lt;/p&gt;
&lt;p&gt;With the command above I find a number of these exceptions&lt;/p&gt;&lt;pre class="debug"&gt;Exception object: 06f392b4
&lt;strong&gt;Exception type: System.ArgumentException
Message: Value can't be less than 1.0
&lt;/strong&gt;InnerException: &lt;none&gt;
StackTrace (generated):
    SP       IP       Function
&lt;strong&gt;    0F34F19C 0F1006DE App_Code_klmxs0si!Calculate.GetTerm(Double)+0x6e
&lt;/strong&gt;    0F34F1B4 0F10079B App_Code_klmxs0si!Calculate.CalculateThirdTerm(System.Object)+0x33
&lt;/pre&gt;
&lt;p&gt;So this validates the theory that an exception occurred in GetTerm and this in turn cause us to not signal the event and finally block on the WaitAll&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Final thoughts&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you use a synchronization method, whether it be a Monitor, ReaderWriterLock or a ResetEvent, you need to make sure that independently of what happens you will release the lock or signal the event as it may be.&amp;nbsp; With a WaitOne, WaitAny or WaitAll there is an option to provide a timeout&amp;nbsp;in which case the&amp;nbsp;Wait will finish when the timeout is reached and WaitOne, WaitAny or WaitAll will return false so that you can check to see if&amp;nbsp;it timed out. &lt;/p&gt;
&lt;p&gt;With&amp;nbsp;a lock(){} statement you will never orphan the lock, the monitor that is used internally will exit even if an exception occurrs in the lock statement... This is similar to using the using(){} statement instead of disposing manually. &lt;/p&gt;
&lt;p&gt;If you are manually using Monitor.Enter and Monitor.Exit, or if you use AcquireReaderLock or AcquireWriterLock you should release it in a finally block to avoid&amp;nbsp;orphaning it if you throw exceptions. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Laters,&lt;/p&gt;
&lt;p&gt;Tess&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8168995" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20354"&gt;</description><author>If broken it is, fix it you should</author><pubDate>2008-03-12T00:00:00</pubDate><category>Web Service</category></item><item><title>Introducing SQL Server Data Services ( SSDS ) by Nigel Ellis - Mix08 Video Download of Presentation</title><link>http://softlogger.com/20366/DatabaseSQL/introducing-sql-server-data-services--ssds--by-nigel-ellis--mix08-video-download-of-presentation.aspx</link><description>The speakers for the Microsoft Sync Framework, ADO.NET Data Services, and SQL Server Data Services mentioned the one-two punch you get from leveraging these services together. SQL Server Data Services is a web facing data storage and processing utility to be launched by Microsoft during the first-half of 2009...&lt;img src ="http://davidhayden.com/blog/dave/aggbug/3492.aspx" width = "1" height = "1" /&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20366"&gt;</description><author>David Hayden - Florida .NET Developer - C# and SQL Server</author><pubDate>2008-03-12T00:00:00</pubDate><category>Database,SQL</category></item><item><title>Let Live Search know when you update your website</title><link>http://softlogger.com/20268/DatabaseSQL/let-live-search-know-when-you-update-your-website.aspx</link><description>&lt;p&gt;
&lt;strong&gt;UPDATE&lt;/strong&gt;: &lt;em&gt;Google also has a ping service that works in the exact same way. You can find it at http://www.google.com/ping?sitemap=[your sitemap URL]&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
Microsoft&amp;rsquo;s Live Search along with Yahoo and Ask decided some time ago to support Google&amp;rsquo;s &lt;a href="http://www.sitemaps.org/protocol.php"&gt;XML sitemap format&lt;/a&gt;. So if you already have added support for a Google sitemap on your website, it now also works on the other major search engines. 
&lt;/p&gt;
&lt;p&gt;
The &lt;a href="http://blogs.msdn.com/webmaster/archive/2008/02/27/microsoft-to-support-cross-domain-sitemaps.aspx"&gt;new thing&lt;/a&gt; is that Live Search have added a ping service that let&amp;rsquo;s you notify it&amp;nbsp;when your sitemap has been updated. Then Live Search will index the changes and make them appear faster in the search results (or at least so I think, otherwise it wouldn&amp;rsquo;t make much sense to have a ping service). 
&lt;/p&gt;
&lt;p&gt;
It&amp;rsquo;s very simple to ping Live Search. Simply make a request to &lt;em&gt;http://webmaster.live.com/ping.aspx?siteMap=[your sitemap URL]&lt;/em&gt; in any way that suits you best. Do it in a browser manually or let your CMS or blogging engine do it for you. 
&lt;/p&gt;
&lt;h2&gt;For BlogEngine.NET users&lt;/h2&gt;
&lt;p&gt;
If you use BlogEngine.NET then you already have a compatible sitemap. It&amp;rsquo;s located at &lt;em&gt;example.com/sitemap.axd&lt;/em&gt;. See &lt;a href="http://blog.madskristensen.dk/sitemap.axd" title="My XML sitemap"&gt;my sitemap here&lt;/a&gt;. I&amp;rsquo;ve written an extension that sends the ping automatically whenever a post or page is created or edited and when a comment is added. 
&lt;/p&gt;
&lt;p&gt;
Download the extension below, unzip it and place the &lt;em&gt;LiveSearchPinger.cs&lt;/em&gt; file in the &lt;em&gt;App_Code/Extensions&lt;/em&gt; folder of your BlogEngine.NET website. 
&lt;/p&gt;
&lt;p&gt;
&lt;a rel="enclosure" href="http://blog.madskristensen.dk/file.axd?file=LiveSearchPinger.zip"&gt;LiveSearchPinger.zip (727 bytes)&lt;/a&gt; 
&lt;/p&gt;
&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20268"&gt;</description><author>.NET slave</author><pubDate>2008-03-12T00:00:00</pubDate><category>Database,SQL</category></item><item><title>Binary vs. Source compatibility</title><link>http://softlogger.com/20314/CSharp/binary-vs-source-compatibility.aspx</link><description>&lt;p&gt;&lt;em&gt;Binary Compatibility&lt;/em&gt; means that when something is updated, you continue to work without needing to even recompile.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;em&gt;Source Compatibility&lt;/em&gt; means that you need to recompile to keep things working, but you don't have to actually change the sources. &lt;/p&gt; &lt;p&gt;One is not a superset of the other. Here are some examples in each combo.&lt;/p&gt; &lt;p&gt;Compatibility generally doesn't just mean that the change is discoverable, but that the change has some significant breaking implication that would cause a reasonably client to need to adjust their behavior. (Of course, you always find afterwards that's some important client did something unexpected and you need to compensate. Hence the heroics of the AppCompat folks). For example, with C# + reflection, any change is discoverable, so any change could technically break a client; but if a client breaks because they're relying on the names of private methods that you changed, they're hard-pressed to complain.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Yes Binary + Yes Source&lt;/strong&gt;:&lt;/p&gt; &lt;p&gt;Renaming private methods. Changing a method body in a way that continues to behave the same. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Yes Binary,&amp;nbsp; Not Source&lt;/strong&gt;:&lt;/p&gt; &lt;p&gt;Adding new method overloads.&amp;nbsp; Since overload resolution is determined at compile time, adding new methods won't affect already-compiled binaries. But if you recompile, it's possible that you may bind to the new overloads.&amp;nbsp; (For example, see &lt;a href="http://blogs.msdn.com/jmstall/archive/2005/03/23/401038.aspx"&gt;float.Equals&lt;/a&gt;)&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Not Binary, Yes Source&lt;/strong&gt;:&lt;/p&gt; &lt;p&gt;In this case, you just need to recompile your sources to keep working. The compiler will respond to the change in a corrective way. For example, consider removing a method overload. At a binary level, the method you're bound to is removed and so things fail. But if you recompile, the compiler may bind to another overload that's semantically equivalent, and so things keep working without you having to change any source.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Not Binary, Not Source&lt;/strong&gt;:&lt;/p&gt; &lt;p&gt;A real breaking change. This requires clients to update their sources and recompile. For example, removing a method. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8141635" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20314"&gt;</description><author>Mike Stalls blog                                                                                    </author><pubDate>2008-03-11T00:00:00</pubDate><category>CSharp</category></item><item><title>CurrentCulture, CurrentUICulture and DateTime strings</title><link>http://softlogger.com/20363/ASP-NET/currentculture-currentuiculture-and-datetime-strings.aspx</link><description>&lt;p&gt;There are a lot of blogs out that that tries to explain which is what, and why it is the way it is.&lt;/p&gt;  &lt;p&gt;To those of you who just want to know what the results are. I wrote a quick little app to show what happens.&lt;/p&gt;  &lt;p&gt;As you can see, DateTime.ToString() formatting is driven purely by CurrentCulture.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/kathykam/WindowsLiveWriter/CurrentCultureCurrentUICultureandDateTim_E66D/image_6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="86" alt="image" src="http://blogs.msdn.com/blogfiles/kathykam/WindowsLiveWriter/CurrentCultureCurrentUICultureandDateTim_E66D/image_thumb_2.png" width="523" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;You can read more about the reasons and background here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx"&gt;MSDN CultureInfo Documentation&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/michkap/archive/2007/01/11/1449754.aspx"&gt;Why we have both CurrentCulture and CurrentUICulture [MichKap]&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/ddietric/archive/2008/02/05/yacvcp-yet-another-currentculture-vs-currentuiculture-post.aspx"&gt;YACVCP (Yet another CurrentCulture vs. CurrentUICulture post) [Dennis Dietrich]&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For other DateTime Format String info, check out my blog post &lt;a href="http://blogs.msdn.com/kathykam/archive/2006/09/29/.NET-Format-String-102_3A00_-DateTime-Format-String.aspx"&gt;&amp;quot;.NET Format String 102: DateTime Format String&amp;quot;&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8162911" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20363"&gt;</description><author>Kathy Kam</author><pubDate>2008-03-11T00:00:00</pubDate><category>ASP.NET</category></item><item><title>What's wrong with one of GetNumberFormat's callers? And what's wrong with GetNumberFormat?</title><link>http://softlogger.com/20344/Object-Oriented-Concepts/what-s-wrong-with-one-of-getnumberformat-s-callers-and-what-s-wrong-with-getnumberformat.aspx</link><description>&lt;P&gt;&lt;FONT color=#ff0000 size=1&gt;&lt;EM&gt;Please read the &lt;/EM&gt;&lt;/FONT&gt;&lt;A class=" " href="http://blogs.msdn.com/michkap/pages/7934999.aspx" mce_href="http://blogs.msdn.com/michkap/pages/7934999.aspx"&gt;&lt;EM&gt;&lt;FONT size=1&gt;disclaimer&lt;/FONT&gt;&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;&lt;FONT color=#ff0000 size=1&gt;; content of &lt;A class=" " href="http://blogs.msdn.com/michkap" mce_href="http://blogs.msdn.com/michkap"&gt;Michael Kaplan's blog&lt;/A&gt; not approved by Microsoft!&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Some of you may recall Igor Levicki, the guy who had 64-bit keyboards working before MSKLC 1.4 was released who I mentioned in &lt;A class=" " href="http://blogs.msdn.com/michkap/archive/2006/09/28/774957.aspx" mce_href="http://blogs.msdn.com/michkap/archive/2006/09/28/774957.aspx"&gt;&lt;STRONG&gt;If you just don't think you can hold it (64-bit style!)&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The other day he sent me mail about a bug (actually a small bundle of bugs, but the bug he found was a crash bug) in a third party application (name withheld to protect the guilty, and&amp;nbsp;also the embarrassed!).&lt;/P&gt;
&lt;P&gt;Igor&amp;nbsp;looked at crash via the disassembly, which I'll put here just for the sake of completeness. If you are the same kind of person you can work along here and try to find the problems within the disassembly:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;; Exported entry 592. &lt;A href="mailto:?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z"&gt;?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z&lt;/A&gt;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;; wchar_t* __cdecl CAppUtils__GetDoubleFormat(double, int)&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public &lt;A href="mailto:?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z"&gt;?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z&lt;/A&gt;&amp;nbsp;&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&lt;A href="mailto:?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z"&gt;?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z&lt;/A&gt; proc near&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;var_108&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = qword&amp;nbsp;&amp;nbsp;&amp;nbsp; ptr -108h&lt;BR&gt;LCData&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = word ptr -0D4h&lt;BR&gt;Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = word ptr -0D0h&lt;BR&gt;var_4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = dword&amp;nbsp;&amp;nbsp;&amp;nbsp; ptr -4&lt;BR&gt;arg_0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = qword&amp;nbsp;&amp;nbsp;&amp;nbsp; ptr&amp;nbsp; 8&lt;BR&gt;arg_8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = dword&amp;nbsp;&amp;nbsp;&amp;nbsp; ptr&amp;nbsp; 10h&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; ebp&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; ebp, esp&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, 0FFFFFFC0h&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sub&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, 0FCh&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, dword_1007E01C&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xor&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, esp&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+0FCh+var_4], eax&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fld&amp;nbsp;&amp;nbsp;&amp;nbsp; [ebp+arg_0]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; esi&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sub&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, 8&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fstp&amp;nbsp;&amp;nbsp;&amp;nbsp; [esp+108h+var_108]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [esp+108h+Value]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; offset aF&amp;nbsp;&amp;nbsp;&amp;nbsp; ; "%f"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; eax&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; String&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; ds:_swprintf&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, 10h&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; 0FFh&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; cchNumber&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; offset word_100873B0 ; lpNumberStr&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; lpFormat&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; ecx, [esp+10Ch+Value]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; ecx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; lpValue&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; dwFlags&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; 400h&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Locale&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; ds:GetNumberFormatW&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; cchData&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; edx, [esp+104h+LCData]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; edx&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; lpLCData&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; 0Eh&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; LCType&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; 400h&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Locale&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; ds:GetLocaleInfoW&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; esi, [ebp+arg_8]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; esi, 0FFFFFFFFh&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jz&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_10008344&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, dword ptr [esp+100h+LCData]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; eax&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; Ch&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; offset word_100873B0 ; Str&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; ds:wcsrchr&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, 8&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, eax&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jz&amp;nbsp;&amp;nbsp;&amp;nbsp; short loc_1000833F&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lea&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, [eax+esi*2+2]&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;loc_1000833F:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; word ptr [eax],&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;loc_10008344:&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; ecx, [esp+100h+var_4]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pop&amp;nbsp;&amp;nbsp;&amp;nbsp; esi&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xor&amp;nbsp;&amp;nbsp;&amp;nbsp; ecx, esp&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; eax, offset word_100873B0&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call&amp;nbsp;&amp;nbsp;&amp;nbsp; sub_10059B35&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp; esp, ebp&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pop&amp;nbsp;&amp;nbsp;&amp;nbsp; ebp&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; retn&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed" size=1&gt;&lt;A href="mailto:?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z"&gt;?GetDoubleFormat@CAppUtils@@SAPB_WNH@Z&lt;/A&gt; endp&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;From assembly it is pretty hard to know whose application it is, but what is happening in this one function is not too hard to figure out.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Now for those who really aren't as comfortable working&amp;nbsp;this way where you have watch&amp;nbsp;parameters get placed on the stack an such&amp;nbsp;(though it should be fairly straightforward to work with&amp;nbsp;in this case&amp;nbsp;for those so inclined!), here is some essentially equivalent&amp;nbsp;C code:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;FONT face="Consolas,Lucida Console,Courier New,Courier,fixed"&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;wchar_t Formatted[256];&lt;BR&gt;&lt;BR&gt;wchar_t *GetDoubleFormat(double Value, int DecimalPlaces) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wchar_t Buffer[MAX_PATH];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DecimalChar;&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _swprintf(Buffer, "%f", Value);&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetNumberFormatW(LOCALE_USER_DEFAULT, LOCALE_NOUSEROVERRIDE, Buffer, NULL, Formatted, 255);&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, &amp;amp;DecimalChar, 2);&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (DecimalPlaces != -1) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wchar_t *Point = wcsrchr(Formatted, DecimalChar);&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Point != NULL) {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Point = Point + DecimalPlaces + 1;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Point = 0x0000;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Formatted;&lt;BR&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;Now this bit of code is as veritable bug farm of how to misuse the NLS API.&lt;/P&gt;
&lt;P mce_keep="true"&gt;What it is trying to do, with many of the bugs embedded in the descriptive language for easy retrieval:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Format a passed in double with the current user default locale and allowing no user overrides.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Retrieve the numeric decimal separator,&amp;nbsp;allowing user overrides.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Search backward through the formatted string looking for that decimal separator.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Increment the pointer to be the passed in number of places after the decimal separator plus one.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Stick a NULL there, effectively truncated the formatted string there.&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;Originally Igor was thinking this might have even made a great entry for &lt;A class=" " href="http://thedailywtf.com/" mce_href="http://thedailywtf.com/"&gt;The Daily WTF&lt;/A&gt;, and I'm not gonna disagree with him on that.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;EM&gt;The crash bug&amp;nbsp;Igor had run into initially was based on the fact that he had Serbian locale settings with a customized decimal separator -- thus the user override mismatch in #1 and #2 above quickly led to a problem searching for a "." in a string such as "44,90" -- then after properly detecting that wcsrchr returning NULL for failure, a somewhat catastrophic situation arises when it tries to dereference that NULL in order to assign to it.&lt;/EM&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Basically what they (apparently) wanted to do was format a number with the user's preferences but overriding the user's choice of the number of decimal places. The resulting string is&amp;nbsp;put in their user interface, returning the result to the user in a property sheet.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT color=#009933 size=4&gt;Worse&amp;nbsp;ways of&amp;nbsp;achieving that goal&amp;nbsp;have been&amp;nbsp;reported in code reviews, but not by reliable witnesses.&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;(There are other silly/problematic issues here, such as:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;LOCALE_SDECIMAL can be up to two characters; this code assumes it is always one (note that this is a problem most code&amp;nbsp;tends to&amp;nbsp;have)&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;The retrieved LOCALE_SDECIMAL value is stored in an &amp;amp;int, presumably to facilitate the later wcsrchr call, but which is less than ideal always (and in the case of #1 will guarantee incorrect detection behavior);&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;GetNumberFormatW assumes that space for the NULL is included in the buffer -- why allocate a wchar_t array of 256 if you are only going to pass 255 for the length? If the function cannot fit the NULL it will fail;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;No return value checking for _swprintf, GetNumberFormatW or GetLocaleInfoW -- despite the fact that they can all return errors and some of the errors would have negative side effects on the intended operation of&amp;nbsp;their GetDoubleFormat function.&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;Now in fairness to the people who wrote this code (whoever they are and whenever they wrote it), &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776317.aspx" mce_href="http://msdn2.microsoft.com/library/ms776317.aspx"&gt;GetNumberFormat&lt;/A&gt; has some specific limitations that make it less useful and that make it more difficult to&amp;nbsp;write the idealized version of this function.&lt;/P&gt;
&lt;P mce_keep="true"&gt;I am going to enumerate the&amp;nbsp;three big problems&amp;nbsp;here as I see them, and Igor might have some additional thoughts on this matter either for comments here or on &lt;A class=" " href="http://www.levicki.net/" mce_href="http://www.levicki.net"&gt;his own site&lt;/A&gt;. :-)&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT color=#ff0000&gt;&lt;STRONG&gt;But the NLS team could think of this next bit as feedback to them&lt;/STRONG&gt;&lt;/FONT&gt; on ways to make functions like &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776317.aspx" mce_href="http://msdn2.microsoft.com/library/ms776317.aspx"&gt;GetNumberFormat&lt;/A&gt; better, faster, easier to use, and more generally useful.&lt;/P&gt;
&lt;P mce_keep="true"&gt;First of all,&amp;nbsp;since &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776317.aspx" mce_href="http://msdn2.microsoft.com/library/ms776317.aspx"&gt;GetNumberFormat&lt;/A&gt; can only take a string rather than a number due to the lack of a LOCALE_SPECIFY_NUMBER flag (as I mentioned in &lt;A class=" " href="http://blogs.msdn.com/michkap/archive/2005/05/29/422980.aspx" mce_href="http://blogs.msdn.com/michkap/archive/2005/05/29/422980.aspx"&gt;&lt;STRONG&gt;Pass the string please&lt;/STRONG&gt;&lt;/A&gt;, three years ago), the caller must format their number as a string via a function like _swprintf so that it can then format the number within the string as yet another a string -- and perhaps this is proof that I have changed my mind a bit since tha tblog; the NLS code really ought to help out more with the more common obvious cases when it can, such as this one.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Second of all (and perhaps most importantly), the longstanding behavior of &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776317.aspx" mce_href="http://msdn2.microsoft.com/library/ms776317.aspx"&gt;GetNumberFormat&lt;/A&gt;&amp;nbsp;that requires either a fully filled in NUMBERFMT in lpFormat or a NULL lpFormat means that the only way to specify an lpFormat-&amp;gt;NumDigits value is to also fill in the lpFormat-&amp;gt;LeadingZero, lpFormat-&amp;gt;Grouping, lpFormat-&amp;gt;lpDecimalSep, lpFormat-&amp;gt;ThousandSep, and lpFormat-&amp;gt;NegativeOrder values as well -- thus requiring up to five calls to GetLocaleInfo for information entirely derivable from the passed-in locale (assuming one value being overridden).&lt;/P&gt;
&lt;P mce_keep="true"&gt;There are any number of alternate possible ways it could have been done -- like establish the NULL case for the struct as being the default which means "take the locale's data", or specify values that mean the same thing, or even define flags to specify which values to pay attention to in the structure (there is room in the dwFlags for this both this function and GetCurrencyFormat!).&lt;/P&gt;
&lt;P mce_keep="true"&gt;Third of all,&amp;nbsp;where&amp;nbsp;&lt;A class=" " href="http://msdn2.microsoft.com/library/ms776317.aspx" mce_href="http://msdn2.microsoft.com/library/ms776317.aspx"&gt;GetNumberFormat&lt;/A&gt; always requires either a fully filled in NUMBERFMT in lpFormat or a NULL lpFormat, if you don't pass in that filled-in NUMBERFMT then the code behind the function always grabs all of the information even if it does not need it -- meaning for example that it will grab the user overridable lpFormat-&amp;gt;ThousandSep even if the number is not big enough to need it according to the number itself. The upshot of this is that the performance of the function is much better if you pass in the lpFormat yourself if you have the data handy -- because the function is not smart about how it does its work.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Now one may argue against that type of optimization due to potential thread safety issues&amp;nbsp;caused by &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776312.aspx" mce_href="http://msdn2.microsoft.com/library/ms776312.aspx"&gt;SetLocaleInfo&lt;/A&gt; calls happening while number formatting is happening, but given that this is already&amp;nbsp;really a bit&amp;nbsp;of a problem in the code terms of consistent number formatting in such situations&amp;nbsp;(and also how uncommon &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776312.aspx" mce_href="http://msdn2.microsoft.com/library/ms776312.aspx"&gt;SetLocaleInfo&lt;/A&gt; calls or user-specific Regional Options changes that amount to &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776312.aspx" mce_href="http://msdn2.microsoft.com/library/ms776312.aspx"&gt;SetLocaleInfo&lt;/A&gt; calls actually are), there are much better solutions for this problem that are possible. Much moreso&amp;nbsp;than the current solution (trying to front-load all of the data loading calls to minimize the number of possible &lt;A class=" " href="http://msdn2.microsoft.com/library/ms776312.aspx" mce_href="http://msdn2.microsoft.com/library/ms776312.aspx"&gt;SetLocaleInfo&lt;/A&gt; calls that could happen). And many of those better solutions would be more performant, too!&lt;/P&gt;
&lt;P mce_keep="true"&gt;On top of all that, this front-loading in the case of the NULL lpFormat happens when LOCAL:E_NOUSEROVERRIDE is specified, too -- meaning there is no thread safety issue all but the code is happy to fill a structure with six separate data items&amp;nbsp;without ever&amp;nbsp;returning the data it loaded to the caller (in case they were going to call the function repeatedly). If one has to pay the price, one would like a bit more for one's money, in my opinion....&lt;/P&gt;
&lt;P mce_keep="true"&gt;If those issues did not exist, then all of the work done by the third party GetDoubleFormat&amp;nbsp;could happen in a single very fast function call, rather than a whole bunch of code, such as the buggy code Igor pointed out in the version&amp;nbsp;of the third party application&amp;nbsp;he was looking at.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Now none of this excuses the bugs in&amp;nbsp;the third party&amp;nbsp;application&amp;nbsp;-- that code screws up the usage of NLS functions with multiple&amp;nbsp;bugs including some that crash? They have no good reason to have those.&lt;/P&gt;
&lt;P mce_keep="true"&gt;But if the NLS function did a bit more of the work here, perhaps the kind of developers who were going to make those mistakes when left to their own devices would have one less opportunity to do so?&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Now for the interactive bit of&amp;nbsp;this blog (and incidentally of this Blog):&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Any developers want to take a stab at implementing the &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;wchar_t *GetDoubleFormat(double Value, int DecimalPlaces)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P mce_keep="true"&gt;function without any of the numerous aforementioned&amp;nbsp;bugs? :-)&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT color=#ff00ff&gt;&lt;EM&gt;This blog brought to you by&lt;/EM&gt;&lt;FONT size=5&gt; . &lt;/FONT&gt;&lt;EM&gt;(&lt;A class=" " href="http://www.fileformat.info/info/unicode/char/002e" mce_href="http://www.fileformat.info/info/unicode/char/002e"&gt;U+002e&lt;/A&gt;, aka FULL STOP)&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8120567" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20344"&gt;</description><author>Sorting It All Out</author><pubDate>2008-03-10T00:00:00</pubDate><category>Object Oriented Concepts</category></item><item><title>Why changing SendTimeout does not help for hosted WCF services?</title><link>http://softlogger.com/20312/Web-Service/why-changing-sendtimeout-does-not-help-for-hosted-wcf-services.aspx</link><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;In .NET 3.0, you would handle two different timeouts:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;Binding.SendTimeout&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;This is the timeout that specifies how long the client can wait for the transport to complete data writing until throwing exception. It is client side setting. If the request would likely take longer than the default (1 minute), you would need to increase it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;Binding.ReceiveTimeout&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;This is the timeout that specifies how long the service can wait from the beginning of receiving a request until the message is processed. It’s server-side setting. When you send a large message to the service and the service needs long time to process, you would need to increase this setting.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;Ideally, using these two timeouts should solve most timeout problems. However, when a WCF service is hosted in IIS/ASP.NET, another setting would also control the lifetime of the request:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.executiontimeout.aspx"&gt;&lt;FONT size=3&gt;HttpRuntimeSection.ExecutionTimeout&lt;/FONT&gt;&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;The default of this value is 110 seconds. When you have very slow service operations which would cause timeouts to happen, the request would be aborted and you can find an ASP.NET EventLog entry that tells that the request has timed out. As per the &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/e1f13641(VS.80).aspx"&gt;&lt;FONT size=3&gt;link&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;, you can configure this setting through web.config as following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; LINE-HEIGHT: 115%; FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 11.0pt; mso-themecolor: text2"&gt;&amp;lt;configuration&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; LINE-HEIGHT: 115%; FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 11.0pt; mso-themecolor: text2"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;system.web&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; LINE-HEIGHT: 115%; FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 11.0pt; mso-themecolor: text2"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;httpRuntime executionTimeout="600"/&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; LINE-HEIGHT: 115%; FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 11.0pt; mso-themecolor: text2"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/system.web&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #1f497d; LINE-HEIGHT: 115%; FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Courier New'; mso-bidi-font-size: 11.0pt; mso-themecolor: text2"&gt;&amp;lt;/configuration&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;This would set the timeout to be 600 seconds (10 minutes). From code, you can use the following API to achieve the same:&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoListParagraph style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;&lt;FONT size=3&gt;·&lt;/FONT&gt;&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;HttpApplication.Server.ScriptTimeout&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;If you use ASMX services, you would hit this exact problem too.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; mso-ascii-theme-font: major-latin; mso-hansi-theme-font: major-latin"&gt;&lt;FONT size=3&gt;Fortunately this has been enhanced in .NET 3.0 SP1 so that this is taken care of internally. The ScriptTimeout was set to be Int.MaxValue for WCF requests. In this way, WCF has the full control of the lifetime of the requests.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8137077" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20312"&gt;</description><author>Wenlong Dongs Blog</author><pubDate>2008-03-10T00:00:00</pubDate><category>Web Service</category></item><item><title>Decompiling Silverlight 2 Apps – Enter the XAP</title><link>http://softlogger.com/20225/DatabaseSQL/decompiling-silverlight-2-apps--enter-the-xap.aspx</link><description>When you build a Silverlight 2 application, you compile your source files (inc. XAML and embedded resources) into assemblies (dlls). Those assemblies (plus any 3rd party ones plus MS assemblies that are not part of Silverlight) are then collected together along with a manifest into a packaged archive – or in other words, a ZIP file. Except, the extension is changed to be a .XAP (pronounced "ZAP"). The benefits of packaging everything into a XAP should be obvious but in case they are not, &lt;a href="http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2008/03/05/Xap_2100_-App_2100_-Pow_2100_-Packaging-and-Application-Startup-in-Silverlight-2-Beta-1-_2D00_-Part-1.aspx"&gt;Pete has discussed that on his blog (inc. screenshots)&lt;/a&gt;. Note that if your web server is on IIS (prior to version 7) you need to &lt;a href="http://simplesilverlight.wordpress.com/2008/03/07/register-xap-file-in-iis/"&gt;register that MIME type&lt;/a&gt;. &lt;em&gt;As an aside, my web server happens to be Apache (shocking I know!) and I had to configure nothing – it just worked.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;So, if I had given you a Winforms EXE file you wouldn't ask me for the source code, you would probably just pass it through your favourite decompiler and you've got it all. Same with Silverlight apps: if I point you to my web page that is running a Silverlight app (e.g. &lt;a href="http://www.danielmoth.com/Blog/2008/03/silverlight-browser-integration-aka.html"&gt;the one from this post&lt;/a&gt;) all you have to do is:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. View HTML source&lt;/strong&gt;, e.g. for this: http://www.danielmoth.com/SL/HtmlBridge/index.html&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Locate the tag that points to a XAP file&lt;/strong&gt; and copy the full path, e.g. ClientBin/DemoIntegration.xap&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Use that path to "Save As"&lt;/strong&gt; the xap file locally.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. Rename the XAP file to ZIP&lt;/strong&gt; and explode it to get the DLLs inside.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5. Party away by tossing the DLL(s) to the decompiler&lt;/strong&gt;, e.g. Reflector.&lt;br /&gt;&lt;br /&gt;Obviously authors of serious SL apps may not condone that behaviour, but feel free to do it with all of mine, for example the &lt;a href="http://www.danielmoth.com/Blog/2008/03/multiscaleimage-with-mouse-support-ish.html"&gt;DeepZoom/MultiScaleImage that I have now updated to also use mouse wheel&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;hr/&gt;
&lt;span style="font-style: italic;font-size:85%;"&gt;Comments about this post welcome at &lt;a href="http://www.danielmoth.com/Blog/"&gt;the original blog&lt;/a&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=PLXFtrF"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=PLXFtrF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=Re1gIoF"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=Re1gIoF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=fqqLZbf"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=fqqLZbf" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=9AlGZzf"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=9AlGZzf" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=AanA5HF"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=AanA5HF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=k5at4rf"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=k5at4rf" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=ZohuOAF"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=ZohuOAF" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DanielMoth/~4/248456118" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20225"&gt;</description><author>The Moth</author><pubDate>2008-03-09T00:00:00</pubDate><category>Database,SQL</category></item><item><title>Silverlight Browser Integration aka HTML Bridge</title><link>http://softlogger.com/20226/XML-XSLT/silverlight-browser-integration-aka-html-bridge.aspx</link><description>Given that Silverlight applications sit in the browser via a plug in, it would be silly if you couldn't interact from managed SL code with other browser elements, such as html elements and script so that you could, for example, reuse existing assets. I have heard the browser-agnostic integration featured described as &lt;strong&gt;HTML Bridge&lt;/strong&gt; and it is implemented in the &lt;code&gt;System.Windows.Browser.dll&lt;/code&gt; assembly in a &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser(VS.95).aspx"&gt;same named namespace&lt;/a&gt;. You can see the types from that namespace on the following image (click on it for the &lt;a href="http://www.danielmoth.com/Blog/HtmBridgeExpanded.png"&gt;expanded version&lt;/a&gt;):&lt;br /&gt;&lt;a href="http://www.danielmoth.com/Blog/HtmBridgeExpanded.png"&gt;&lt;img src="http://www.danielmoth.com/Blog/HtmBridgeCollapsed.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The important inheritance hierarchy to be aware of is that &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.htmldocument_members(VS.95).aspx"&gt;HtmlDocument&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.htmlelement_members(VS.95).aspx"&gt;HtmlElement&lt;/a&gt; inherit from &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.htmlobject_members(VS.95).aspx"&gt;HtmlObject&lt;/a&gt; (that allows handling script events via &lt;em&gt;AttachEvent&lt;/em&gt;) which inherits from &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.scriptobject_members(VS.95).aspx"&gt;ScriptObject&lt;/a&gt; (that allows you to execute scripts via its &lt;em&gt;Invoke&lt;/em&gt; and &lt;em&gt;InvokeSelf&lt;/em&gt; methods). &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.htmlpage_members(VS.95).aspx"&gt;HtmlPage&lt;/a&gt; is a great entry point because you can navigate across its &lt;em&gt;Window&lt;/em&gt; property to an &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.htmlwindow_members(VS.95).aspx"&gt;HtmlWindow&lt;/a&gt; (that allows e.g. to &lt;em&gt;Navigate&lt;/em&gt; URLs) and across its &lt;em&gt;Document&lt;/em&gt; property to an &lt;em&gt;HtmlDocument&lt;/em&gt; (that offers e.g. access to &lt;em&gt;Cookies&lt;/em&gt; and &lt;em&gt;QueryString&lt;/em&gt;). Also note the 2 Attribute classes: &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.scriptabletypeattribute_members(VS.95).aspx"&gt;ScriptableType&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.scriptablememberattribute_members(VS.95).aspx"&gt;ScriptableMember&lt;/a&gt;. Those are used for exposing Silverlight managed classes to script in the browser combined with &lt;em&gt;HtmlPage&lt;/em&gt;.&lt;em&gt;RegisterScriptableObject&lt;/em&gt; and &lt;em&gt;RegisterCreateableType&lt;/em&gt; methods. Open the expanded class diagram in a separate window and identify the aforementioned methods. Notice there how &lt;em&gt;HtmlDocument&lt;/em&gt; allows you to create new elements and retrieve existing ones (&lt;em&gt;CreateElement&lt;/em&gt; and &lt;em&gt;GetElementById&lt;/em&gt;). Once you have references to those &lt;em&gt;HtmlElements&lt;/em&gt; you can do things like &lt;em&gt;SetAttribute&lt;/em&gt;, &lt;em&gt;SetStyleAttribute&lt;/em&gt; and &lt;em&gt;AppendChild&lt;/em&gt; to name a few. Script events are handled in your managed &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.scripteventhandler(VS.95).aspx"&gt;ScriptEventHandler&lt;/a&gt; method that accepts an &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.htmleventargs_members(VS.95).aspx"&gt;HtmlEventArgs&lt;/a&gt; which you can find on the class diagram along with its relationships (e.g. &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.mousebuttons(VS.95).aspx"&gt;MouseButtons&lt;/a&gt;). You should also checkout the &lt;a href="http://msdn2.microsoft.com/en-gb/library/system.windows.browser.httputility_members(VS.95).aspx"&gt;HttpUtility&lt;/a&gt; class and its self-explanatory methods such as &lt;em&gt;UrlEncode&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;Phew! Take a moment to study the two class diagrams using the previous paragraph as a guide and also note that all links above are direct links to the API documentation (i.e. this blog post becomes my bookmark into MSDN ;)). You can also follow a quickstart (&lt;a href="http://silverlight.net/Quickstarts/Dom/DomAccess.aspx"&gt;DOM access&lt;/a&gt;), two walkthroughs (calling &lt;a href="http://msdn2.microsoft.com/en-gb/library/cc221414(VS.95).aspx"&gt;managed from script&lt;/a&gt; and &lt;a href="http://msdn2.microsoft.com/en-gb/library/cc221359(VS.95).aspx"&gt;script from managed&lt;/a&gt;), and for those that want even more, &lt;a href="http://download.microsoft.com/download/9/4/e/94e080c7-d462-4118-b07a-55578d64bc43/Silverlight%202%20Beta%201%20-%20Browser%20Integration.zip"&gt;follow this 2-hour lab (ZIP)&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;To see some of the browser integration in action, I have here the &lt;a href="http://www.danielmoth.com/SL/HtmlBridge/"&gt;ugliest and most basic SL app that simply proves some of the concepts&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;br/&gt;&lt;hr/&gt;
&lt;span style="font-style: italic;font-size:85%;"&gt;Comments about this post welcome at &lt;a href="http://www.danielmoth.com/Blog/"&gt;the original blog&lt;/a&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=7aAS44F"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=7aAS44F" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=o1qn9KF"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=o1qn9KF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=zBcUzJf"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=zBcUzJf" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=7wOAgtf"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=7wOAgtf" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=G27XqQF"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=G27XqQF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=30OjbNf"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=30OjbNf" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/DanielMoth?a=QiLszIF"&gt;&lt;img src="http://feeds.feedburner.com/~f/DanielMoth?i=QiLszIF" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/DanielMoth/~4/248015140" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20226"&gt;</description><author>The Moth</author><pubDate>2008-03-08T00:00:00</pubDate><category>XML/XSLT</category></item><item><title>Building Great AJAX Applications from Scratch Using ASP.NET 3.5 and Visual Studio 2008 - MIX 08 Presentation</title><link>http://softlogger.com/20375/DatabaseSQL/building-great-ajax-applications-from-scratch-using-asp-net-3-5-and-visual-studio-2008--mix-08-presentation.aspx</link><description>&lt;H1&gt;&lt;FONT face=Verdana&gt;Building Great AJAX Applications from Scratch Using ASP.NET 3.5 and Visual Studio 2008 - MIX 08 Presentation&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;by &lt;A href="http://www.davidhayden.com/"&gt;David Hayden&lt;/A&gt;, &lt;A href="http://www.davidhayden.com/"&gt;Florida ASP.NET Web Developer&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;IMG alt="Building Great AJAX Applications" src="http://www.davidhayden.com/photos/MIX08BuildingGreatAJAXApplications.jpg" align=right&gt;Brad Abrams hit a homerun with his MIX 08 Presentation on &lt;STRONG&gt;Building Great AJAX Applications from Scratch Using ASP.NET 3.5 and Visual Studio 2008&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I watched the video and was really, really impressed with his coverage of:&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Visual Studio 2008 CSS and Style Sheet Management&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;LINQ To SQL Basics&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Introduction to the new ListView and DataPager Controls in .NET 3.5 Framework&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Using the ASP.NET AJAX Server-Side UpdatePanel and UpdateProgress Controls&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Client-Side AJAX Calls using JavaScript to WCF Services&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Use of the AJAX Control Toolkit for a Richer User Exprerience&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Switching Between Internet Explorer and Firefox /&amp;nbsp;FireBug&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;Demonstrating&amp;nbsp;a ScriptCombining Feature that will be released in a .NET 3.5 SP1 it seems&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;A nice and realistic list of AJAX Website Features demonstrated on-the-fly that one would want to use in a real-world application.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;He even &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/brada/archive/2008/03/06/mix08-session-overview-building-great-ajax-applications-from-scratch-using-asp-net-3-5-and-visual-studio-2008.aspx" target=_blank&gt;&lt;FONT face=Verdana size=2&gt;posted a great summary&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; of his talk as well as provided the sample code for download on his blog. Still, I would watch the video because he does a great job of walking you through building the ASP.NET AJAX Web Application piece-by-piece.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Verdana&gt;MIX 08 Sessions Viewed&lt;/FONT&gt;&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana size=2&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2008/03/06/ASPNETDynamicDataWebsitesPresentationMix08.aspx"&gt;Developing Data-Driven Web Applications Using ASP.NET Dynamic Data&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;FONT face=Verdana&gt;ASP.NET AJAX Tutorials&lt;/FONT&gt;&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2008/03/03/AJAXControlToolkitVisualStudio2008NET35FrameworkReleased.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;AJAX Control Toolkit for Visual Studio 2008 and .NET 3.5 Released - 3.0.20229&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2008/02/21/DropthingsAjaxWebPortal.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Dropthings - Ajax Web Portal - Sample Application of AJAX, LINQ To SQL, LINQ To XML, Windows Workflow&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2008/02/06/ASPNETMVCFrameworkAJAXjQueryJavaScriptSerializerLINQ.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;ASP.NET MVC Framework and AJAX Using jQuery, JavaScriptSerializer and LINQ&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://www.pnpguidance.net/Screencast/DayOfPatternsPracticesScreencastWCSFAJAXDynamicDataMVCFramework.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Day Of Patterns &amp;amp; Practices Screencast - WCSF AJAX DynamicData ASP.NET MVC Framework&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/30/ASPNETAJAXPageRequestManagerbeginRequestendRequestEventsUpdateProgress.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;ASP.NET AJAX PageRequestManager beginRequest and endRequest Events for UpdateProgress&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/29/ASPNETAJAXProgressIndicatorRealTimeSearchFunctionalityYUIStyle.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;ASP.NET AJAX Progress Indicator with Real-Time Search Functionality - YUI Style&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/20/FreeASPNETAJAXELearningClinic.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Free ASP.NET AJAX E-Learning Clinic&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/16/EnableAJAXExistingASPNETWebsiteUsingWCSF.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Enable AJAX on Existing ASP.NET Website Using WCSF&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/13/VS2008JavascriptDebugging.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;VS2008 Javascript Debugging&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/12/SearchingASPNETAJAXWebServicesUpdatePanel.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Searching via ASP.NET AJAX and Web Services without UpdatePanel&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/10/SearchBundleWCSFRealTimeSearchFunctionalityASPNETAJAX.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Search Bundle in WCSF - Real-Time Search Functionality using ASP.NET AJAX&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/10/ConsumingWebServiceUsingASPNETAJAXPartII.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Consuming Web Service using ASP.NET AJAX Part II&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/07/CallingWebServicesUsingClientSideASPNETAJAXServerSideValidation.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;Calling Web Services using Client-Side ASP.NET AJAX for Server-Side Validation&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt; &lt;/FONT&gt;
&lt;LI&gt;&lt;A href="http://davidhayden.com/blog/dave/archive/2007/11/05/ASPNETAJAXServerSideValidationServerSideValidationExtenderValidationGuidanceBundle.aspx"&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;ASP.NET AJAX Server-Side Validation - ServerSideValidationExtender in Validation Guidance Bundle&lt;/FONT&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;News Feed: &lt;/FONT&gt;&lt;A href="http://www.davidhayden.com/"&gt;&lt;FONT face=Verdana size=2&gt;http://www.davidhayden.com/&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://davidhayden.com/blog/dave/aggbug/3484.aspx" width = "1" height = "1" /&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20375"&gt;</description><author>David Hayden - Florida .NET Developer - C# and SQL Server</author><pubDate>2008-03-07T00:00:00</pubDate><category>Database,SQL</category></item><item><title>Silverlight 2 Beta 1 Control Samples</title><link>http://softlogger.com/20365/ASP-NET/silverlight-2-beta-1-control-samples.aspx</link><description>&lt;p&gt;My sample and its source is now live on &lt;a href="http://silverlight.net"&gt;http://silverlight.net&lt;/a&gt;! It show case a variety of controls we have built for the Silverlight 2 Beta 1. We have quite an good set of controls. It shouldn't surprise my readers to know that we have a DatePicker and a Calendar. :) And yes, I am the PM for those features. So for those of you who are sick of using my &lt;a href="http://blogs.msdn.com/kathykam/archive/2007/11/06/monthcalendar-and-datepicker-control-for-silverlight.aspx"&gt;Silverlight 1.1 Calendar/DatePicker&lt;/a&gt;. Pick up the latest &lt;a href="http://www.microsoft.com/silverlight/resources/installationFiles.aspx?v=2.0"&gt;Silverlight 2 Beta 1&lt;/a&gt;! &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img height="172" alt=" " src="http://silverlight.net/Themes/silverlight/images/learn/controls.png" width="269" border="0" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://silverlight.net/Samples/2b1/SilverlightControls/run/default.html"&gt;Silverlight Control Demo Sample&lt;/a&gt;     &lt;br /&gt;Uploaded on March 5     &lt;br /&gt;&lt;em&gt;Created by:&lt;/em&gt; &lt;a href="http://blogs.msdn.com/kathykam/"&gt;Kathy Kam&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A sample of twenty-four Silverlight 2 controls that can be viewed live together with the source code used to drive the controls. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Check out other samples here:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://silverlight.net/community/gallerydetail.aspx?cat=5&amp;amp;sort=1#vid1080" href="http://silverlight.net/community/gallerydetail.aspx?cat=5&amp;amp;sort=1#vid1080"&gt;http://silverlight.net/community/gallerydetail.aspx?cat=5&amp;amp;sort=1#vid1080&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Also, as mentioned by ScottGu this morning. You can download the source and unit tests to all the controls here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=ea93dd89-3af2-4acb-9cf4-bfe01b3f02d4&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=ea93dd89-3af2-4acb-9cf4-bfe01b3f02d4&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Love to hear what you think! I am excited to see applications people build with these controls. Tell me what you are building!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8056395" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=20365"&gt;</description><author>Kathy Kam</author><pubDate>2008-03-05T00:00:00</pubDate><category>ASP.NET</category></item><item><title>patterns and practices Complete Catalog</title><link>http://softlogger.com/19811/BizTalk/patterns-and-practices-complete-catalog.aspx</link><description>&lt;p&gt;What's the full patterns &amp;amp; practices catalog?&amp;nbsp; I created a quick index of the patterns &amp;amp; practices catalog since I've needed to hunt down a few things.&amp;nbsp; I figured this might be useful to share. &lt;p&gt;&lt;strong&gt;Views&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/practices/bb969097.aspx" target="_blank"&gt;Complete Catalog&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998404.aspx" target="_blank"&gt;Security Engineering Index&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998408.aspx" target="_blank"&gt;Security Guidance for Applications Index&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998408.aspx" target="_blank"&gt;Security Guidance for .NET Framework 2.0&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Blocks &lt;/strong&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480456.aspx" target="_blank"&gt;Caching Application Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480457.aspx" target="_blank"&gt;Cryptography Application Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480458.aspx" target="_blank"&gt;Data Access Application Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480461.aspx" target="_blank"&gt;Exception Handling Application Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480464.aspx" target="_blank"&gt;Logging Application Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb410104.aspx" target="_blank"&gt;Policy Injection Application Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480465.aspx" target="_blank"&gt;Security Application Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480450.aspx" target="_blank"&gt;Smart Client - Composite Application UI Block&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb410105.aspx" target="_blank"&gt;Validation Application Block&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Enterprise Library&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480453.aspx" target="_blank"&gt;Enterprise Library&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Factories&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480471.aspx" target="_blank"&gt;Mobile Client Software Factory&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480482.aspx" target="_blank"&gt;Smart Client Software Factory&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb264518.aspx" target="_blank"&gt;Web Client Software Factory&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb931187.aspx" target="_blank"&gt;Web Service Software Factory: Modeling Edition&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Guides&lt;/strong&gt;  &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms954595.aspx" target="_blank"&gt;Application Architecture for .NET: Designing Applications and Services&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978732.aspx" target="_blank"&gt;Application Interoperability: Microsoft .NET and J2EE&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978378.aspx" target="_blank"&gt;Authentication in ASP.NET: .NET Security Guidance&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa302415.aspx" target="_blank"&gt;Building Secure ASP.NET Applications: Authentication, Authorization, and Secure Communication&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978498.aspx" target="_blank"&gt;Caching Architecture Guide for .NET Framework Applications&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978510.aspx" target="_blank"&gt;Data Access Architecture Guide&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms954585.aspx" target="_blank"&gt;Deploying .NET Framework-based Applications&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978655.aspx" target="_blank"&gt;Describing the Enterprise Architectural Space&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978631.aspx" target="_blank"&gt;Design and Implementation Guidelines for Web Clients&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms954586.aspx" target="_blank"&gt;Designing Application-Managed Authorization&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978496.aspx" target="_blank"&gt;Designing Data Tier Components and Passing Data Through Tiers&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms954599.aspx" target="_blank"&gt;Exception Management Architecture Guide&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978650.aspx" target="_blank"&gt;Guidelines for Application Integration&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998530.aspx" target="_blank"&gt;Improving .NET Application Performance and Scalability&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms994921.aspx" target="_blank"&gt;Improving Web Application Security: Threats and Countermeasures&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb931189.aspx" target="_blank"&gt;Microsoft ESB Guidance for BizTalk Server 2006 R2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb924375.aspx" target="_blank"&gt;Performance Testing Guidance for Web Applications&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998382.aspx" target="_blank"&gt;Security Engineering Explained&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998506.aspx" target="_blank"&gt;Smart Client Architecture and Design Guide&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998239.aspx" target="_blank"&gt;Team Development with Visual Studio .NET and Visual SourceSafe&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb668991.aspx" target="_blank"&gt;Team Development with Visual Studio Team Foundation Server&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998205.aspx" target="_blank"&gt;Testing .NET Application Blocks - Version 1.0&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978516.aspx" target="_blank"&gt;Threat Modeling Web Applications&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Patterns&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998446.aspx" target="_blank"&gt;Data Patterns&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms998469.aspx" target="_blank"&gt;Enterprise Solution Patterns Using Microsoft .NET&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms978729.aspx" target="_blank"&gt;Integration Patterns&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480545.aspx" target="_blank"&gt;Web Service Security Guidance&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/teamsystem/aa718948.aspx" target="_blank"&gt;Guidance Automation Toolkit (GAT) and Guidance Automation Extensions (GAX)&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.codeplex.com/GuidanceExplorer" target="_blank"&gt;Guidance Explorer&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8019185" width="1" height="1"&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=19811"&gt;</description><author>J.D. Meiers Blog</author><pubDate>2008-03-04T00:00:00</pubDate><category>BizTalk</category></item><item><title>SQL Server 2008 FILESTREAM - Writing a file to a FILESTREAM column</title><link>http://softlogger.com/19953/DatabaseSQL/sql-server-2008-filestream--writing-a-file-to-a-filestream-column.aspx</link><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/zowens/default.aspx"&gt;Zach Skyles Owens&lt;/a&gt; - &lt;a href="http://blogs.msdn.com/zowens/archive/2008/03/03/sql-server-2008-filestream-and-wpf-mediaelement-part-2-writing-filestream-data.aspx"&gt;SQL Server 2008 FILESTREAM and WPF MediaElement - Part 2 (Writing FILESTREAM Data)&lt;/a&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Wow...  It's been a long time coming.  I promised that I would explain in more detail how to write FILESTREAM data to SQL Server 2008.  This is the &lt;a href="http://blogs.msdn.com/zowens/archive/2007/10/11/sql-server-2008-filestream-and-wpf-mediaelement.aspx"&gt;second article in a series&lt;/a&gt; and uses the sample published on the &lt;a href="http://codeplex.com/SQLSrvE2E"&gt;SQL Server Community Samples site on CodePlex&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Writing data to a varbinary(max) FILESTREAM column in SQL is a bit more involved then just opening a file on the filesystem.  SQL Server needs to manage this operation within a transaction which adds a bit of complexity.  Here are the basic steps...  These steps apply both to reading and writing.&lt;/p&gt;&lt;p&gt;Start a SQL Server transaction &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Insert a row into the table containing metadata &lt;/li&gt;&lt;li&gt;Select the PathName from SQL Server which will be used to get a handle &lt;/li&gt;&lt;li&gt;Open a handle for writing using sqlncli10.dll &lt;/li&gt;&lt;li&gt;Use that handle within System.IO classes &lt;/li&gt;&lt;li&gt;Commit the transaction&lt;/li&gt;&lt;li&gt;Now that the basic steps are laid out, let's take a closer look&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;So...  Here's where I think things get interesting.  You can see that the SELECT statement above calls the PathName() method of the FILESTREAM column.  Here's an example of the results from the query above. &lt;em&gt;Note the use of UDTs and CLR!&lt;/em&gt;&lt;/p&gt;&lt;p&gt;\\ZOWENS-NB3\MSSQLSERVER\v1\FilestreamWpfHttp\dbo\media\file\4C3C9C2D-8268-43FF-8317-D507319FE21C&lt;/p&gt;&lt;p&gt;This is a "virtual" path managed by SQL Server.  It consists of \\COMPUTER_NAME, followed by a configurable handler \MSSQLSERVER...&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;The code above uses a simple C# class "SqlNativeClient" that wraps the sqlncli10.dll I mentioned above.  This C# class is key to working with FILESTREAM in managed code.  You can see that we passed in the sqlFilePath variable from the PathName() query.&lt;/p&gt;&lt;pre&gt;// Open up a new stream to write the file to the blob.&lt;br /&gt;System.IO.FileStream destBlob = new System.IO.FileStream(handle, FileAccess.Write);&lt;/pre&gt;&lt;p&gt;"Old school" System.IO file manipulation using the handle obtained from the SqlNativeClient class above.&lt;/p&gt;&lt;pre&gt;// Commit transaction       &lt;br /&gt;txn.Commit();&lt;/pre&gt;&lt;p&gt;There you have it...  It's not rocket science but there are a few tricks."&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;This article shows the magic behind the new FILESTREAM column attribute. It shows how it's not just some kind of uber-BLOB, but the delegating of responsibility based on capability. Showing how the SQL does what it is good at, while delegating to the file system to do what it is good it (i.e. file operations, reading, writing, etc)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Interesting... But I'm a little afraid of getting too much into this. What if it doesn't work out and MS kills it in a release or two? (Think Exchange M: drive, Notification Services, etc)&lt;/p&gt;&lt;p&gt;Still it's pretty darn cool and helps solve a number of problems we have today...  &lt;/p&gt;&lt;p&gt;Related Past Post XRef:&lt;br /&gt;&lt;a href="http://coolthingoftheday.blogspot.com/2007/10/more-sql-server-2008-filestream-fun.html"&gt;More SQL Server 2008 FileStream Fun&lt;/a&gt;&lt;br /&gt;&lt;a href="http://coolthingoftheday.blogspot.com/2007/10/playing-with-sql-server-2008-filestream.html"&gt;Playing with the SQL Server 2008 FileStream Attribute&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=az5Jf6F"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=az5Jf6F" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=uKTVrUF"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=uKTVrUF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/coolthingoftheday?a=izNilDF"&gt;&lt;img src="http://feeds.feedburner.com/~f/coolthingoftheday?i=izNilDF" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/coolthingoftheday/~4/245543571" height="1" width="1"/&gt;&lt;img alt="via softlogger.com" src="http://softlogger.com/postview.aspx?ArticleID=19953"&gt;</description><author>Gregs Cool [Insert Clever Name] of the Day</author><pubDate>2008-03-04T00:00:00</pubDate><category>Database,SQL</category></item></channel></rss>