<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Arogl Darthu's Blog</title>
    <link>http://blog.arogldarthu.nl/</link>
    <description>profound astoundment</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <pubDate>Fri, 27 Mar 2009 18:43:30 GMT</pubDate>

    <image>
        <url>http://blog.arogldarthu.nl/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Arogl Darthu's Blog - profound astoundment</title>
        <link>http://blog.arogldarthu.nl/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Wcf Exception Shielding - Unexpected FaultContracts</title>
    <link>http://blog.arogldarthu.nl/archives/12-Wcf-Exception-Shielding-Unexpected-FaultContracts.html</link>
            <category>WCF</category>
    
    <comments>http://blog.arogldarthu.nl/archives/12-Wcf-Exception-Shielding-Unexpected-FaultContracts.html#comments</comments>
    <wfw:comment>http://blog.arogldarthu.nl/wfwcomment.php?cid=12</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.arogldarthu.nl/rss.php?version=2.0&amp;type=comments&amp;cid=12</wfw:commentRss>
    

    <author>nospam@example.com (Twan Jacobs)</author>
    <content:encoded>
    So you&#039;ve got Wcf Exception Shielding in place. All is well and the Enterprise Library Exception Handling Application Block takes care of those nasty exception details that you don&#039;t want your site visitors to know about... But have you ever had the urge to do more than just property mapping between exceptions and FaultContract? I know I have &lt;img src=&quot;http://blog.arogldarthu.nl/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
There is a way to do this and it is actually quite simple to realize. You just have to create your own custom IExceptionHandler. But let&#039;s start with a bit of configuration. By default you would have an Exception Policy named &quot;WCF Exception Shielding&quot;. Like so:&lt;br /&gt;
&lt;div class=&quot;xml&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;exceptionHandling&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;exceptionPolicies&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;add&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;WCF Exception Shielding&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/exceptionPolicies&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/exceptionHandling&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
This policy handles specific Exception types and for each of those it will pass the exception through a chain of IExceptionHandlers. The last of these would normally be Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.WCF.FaultContractExceptionHandler. For instance:&lt;br /&gt;
&lt;div class=&quot;xml&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;exceptionTypes&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;add&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;System.DivideByZeroException, mscorlib&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #009900;&quot;&gt; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;postHandlingAction&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;ThrowNewException&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;DivideByZeroException&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;exceptionHandlers&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;add&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;exceptionMessage&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Dividing by zero is not allowed.&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #009900;&quot;&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000066;&quot;&gt;faultContractType&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;DivideByZeroFault, MyDll&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #009900;&quot;&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000066;&quot;&gt;type&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;FaultContractExceptionHandler, ExceptionHandling.WCF&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #009900;&quot;&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Fault Contract Exception Handler&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;mappings&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;add&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;source&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Guid&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Id&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;add&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;source&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Message&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;Message&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/mappings&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/add&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/exceptionHandlers&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160; &lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/add&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/exceptionTypes&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
Now what if your FaultContract would need additional data, that you can&#039;t just map from the Exception properties? For example:&lt;br /&gt;
- you might need the Message property of the InnerException;&lt;br /&gt;
- you need data that was logged to a database when the original exception got thrown.&lt;br /&gt;
&lt;br /&gt;
To make this possible, just create your own IExceptionHandler that will be used instead of the provided FaultContractExceptionHandler. There are two things to keep in mind when you do this. First of all you should always set the &lt;strong&gt;postHandlingAction&lt;/strong&gt; to &lt;strong&gt;ThrowNewException&lt;/strong&gt;. Second, you should let your IExceptionHandler return a specific Exception type: &lt;strong&gt;FaultContractWrapperException&lt;/strong&gt;. &lt;br /&gt;&lt;a href=&quot;http://blog.arogldarthu.nl/archives/12-Wcf-Exception-Shielding-Unexpected-FaultContracts.html#extended&quot;&gt;Continue reading &quot;Wcf Exception Shielding - Unexpected FaultContracts&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 27 Mar 2009 15:21:54 +0000</pubDate>
    <guid isPermaLink="false">http://blog.arogldarthu.nl/archives/12-guid.html</guid>
    
</item>
<item>
    <title>Proxy's Dispose results in Exception</title>
    <link>http://blog.arogldarthu.nl/archives/11-Proxys-Dispose-results-in-Exception.html</link>
            <category>WCF</category>
    
    <comments>http://blog.arogldarthu.nl/archives/11-Proxys-Dispose-results-in-Exception.html#comments</comments>
    <wfw:comment>http://blog.arogldarthu.nl/wfwcomment.php?cid=11</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.arogldarthu.nl/rss.php?version=2.0&amp;type=comments&amp;cid=11</wfw:commentRss>
    

    <author>nospam@example.com (Twan Jacobs)</author>
    <content:encoded>
    A while ago I grabbed a WCF Membership example from &lt;a href=&quot;http://www.monstersgotmy.net/post/WCF-MembershipProvider-and-RoleProvider-Schweeeet.aspx&quot; title=&quot;Wcf Membership Provider&quot;&gt;here&lt;/a&gt;. Now that I&#039;ve been reading some more on WCF, I stumbled upon the following article: http://msdn.microsoft.com/en-us/library/aa355056.aspx&lt;br /&gt;
&lt;br /&gt;
How do you see this? Have you ever had these &#039;errors from IDisposable&#039; surface in production? Did you start rewriting every client call with try-catch-finally? Personally I&#039;m a bit appalled by the idea... Using the using statement keeps the code clean.&lt;br /&gt;
&lt;br /&gt;
So I started searching for a solution. This article (&lt;a href=&quot;http://www.iserviceoriented.com/blog/post/Indisposable+-+WCF+Gotcha+1.aspx&quot; title=&quot;Almost?&quot;&gt;WCF Gotcha #1&lt;/a&gt;) seems to provide a nice solution, but it&#039;s not exactly what I was hoping for.&lt;br /&gt;
&lt;br /&gt;
Ideas are very welcome! &lt;br /&gt;&lt;a href=&quot;http://blog.arogldarthu.nl/archives/11-Proxys-Dispose-results-in-Exception.html#extended&quot;&gt;Continue reading &quot;Proxy&#039;s Dispose results in Exception&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 27 Jan 2009 09:58:10 +0000</pubDate>
    <guid isPermaLink="false">http://blog.arogldarthu.nl/archives/11-guid.html</guid>
    
</item>
<item>
    <title>Quirks of LEN</title>
    <link>http://blog.arogldarthu.nl/archives/10-Quirks-of-LEN.html</link>
    
    <comments>http://blog.arogldarthu.nl/archives/10-Quirks-of-LEN.html#comments</comments>
    <wfw:comment>http://blog.arogldarthu.nl/wfwcomment.php?cid=10</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.arogldarthu.nl/rss.php?version=2.0&amp;type=comments&amp;cid=10</wfw:commentRss>
    

    <author>nospam@example.com (Twan Jacobs)</author>
    <content:encoded>
    As we all know, the LEN function in T-SQL returns the character length and at that ignores the trailing blanks... So, how to return the length including these trailing blanks? I experimented a little and found that all you have to do is CAST to the appropriate MAXed variant of your datatype. So just try the following:&lt;br /&gt;
&lt;div style=&quot;font-family: Courier New&quot;&gt;&lt;div class=&quot;tsql&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;DECLARE&lt;/span&gt; @l_nContentMax &lt;span style=&quot;color: #0000FF;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;MAX&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;, &amp;#160; &amp;#160; &amp;#160; @l_nContent &amp;#160; &amp;#160;&lt;span style=&quot;color: #0000FF;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;SELECT&lt;/span&gt; @l_nContentMax &lt;span style=&quot;color: #808080;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;1234567890 &amp;#160; &amp;#160; &#039;&lt;/span&gt; &lt;span style=&quot;color: #008080;&quot;&gt;-- character length = 15&lt;/span&gt;&lt;br /&gt;, &amp;#160; &amp;#160; &amp;#160;@l_nContent &amp;#160; &amp;#160;&lt;span style=&quot;color: #808080;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;1234567890 &amp;#160; &amp;#160; &#039;&lt;/span&gt; &lt;span style=&quot;color: #008080;&quot;&gt;-- character length = 15&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: #FF00FF;&quot;&gt;LEN&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;N&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;1234567890 &amp;#160; &amp;#160; &#039;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #0000FF;&quot;&gt;AS&lt;/span&gt; Plain&lt;br /&gt;, &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #FF00FF;&quot;&gt;LEN&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000FF;&quot;&gt;CAST&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;N&lt;span style=&quot;color: #FF0000;&quot;&gt;&#039;1234567890 &amp;#160; &amp;#160; &#039;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;AS&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;NVARCHAR&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #FF00FF;&quot;&gt;MAX&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #0000FF;&quot;&gt;AS&lt;/span&gt; MaxCast&lt;br /&gt;, &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #FF00FF;&quot;&gt;LEN&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;@l_nContent&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000FF;&quot;&gt;AS&lt;/span&gt; PlainVariable&lt;br /&gt;, &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #FF00FF;&quot;&gt;LEN&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#40;&lt;/span&gt;@l_nContentMax&lt;span style=&quot;color: #808080;&quot;&gt;&amp;#41;&lt;/span&gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;span style=&quot;color: #0000FF;&quot;&gt;AS&lt;/span&gt; MaxVariable&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;/div&gt;This results in:&lt;br /&gt;
&lt;img class=&quot;serendipity_image_center&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://blog.arogldarthu.nl/uploads/Pictures/2008-11-13_005115.jpg&quot; alt=&quot;T-Sql Results&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
So... just cast your expression to NVARCHAR(MAX) or VARCHAR(MAX) where appropriate and you&#039;ll get the right length &lt;img src=&quot;http://blog.arogldarthu.nl/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 12 Nov 2008 22:03:33 +0000</pubDate>
    <guid isPermaLink="false">http://blog.arogldarthu.nl/archives/10-guid.html</guid>
    
</item>
<item>
    <title>TF31002</title>
    <link>http://blog.arogldarthu.nl/archives/9-TF31002.html</link>
            <category>WTF</category>
    
    <comments>http://blog.arogldarthu.nl/archives/9-TF31002.html#comments</comments>
    <wfw:comment>http://blog.arogldarthu.nl/wfwcomment.php?cid=9</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.arogldarthu.nl/rss.php?version=2.0&amp;type=comments&amp;cid=9</wfw:commentRss>
    

    <author>nospam@example.com (Twan Jacobs)</author>
    <content:encoded>
    Unable to connect to this Team Foundation Server...&lt;br /&gt;
&lt;br /&gt;
Microsoft Visual Studio 2005 pops up a nice dialog with three possible reasons for failure:&lt;br /&gt;
&lt;img style=&quot;cursor: hand; display: block; float:right; vertical-align: top; margin: 5px; border: 1px solid #000000;&quot; src=&quot;http://blog.arogldarthu.nl/uploads/Pictures/TF31002.serendipityThumb.JPG&quot; onclick=&quot;F1 = window.open(&#039;/uploads/Pictures/TF31002.JPG&#039;, &#039;Zoom&#039;, &#039;height=257,width=483,top=&#039;+ (screen.height-257)/2 +&#039;,left=&#039;+ (screen.width-483)/2 +&#039;,toolbar=no,menubar=no,location=no,resize=1,resizable=1&#039;);&quot; /&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The Team Foundation Server name, port number or protocol is incorrect.&lt;/li&gt;
&lt;li&gt;The Team Foundation Server is offline.&lt;/li&gt;
&lt;li&gt;Password is expired or incorrect.&lt;/li&gt;
&lt;/ul&gt;They should have added: &lt;strong&gt;Your machine.config contains an error.&lt;/strong&gt; In this case a coworker added an &lt;em&gt;appSettings&lt;/em&gt; section to the machine.config. He added valid xml; no errors at all. So why blame the config settings you might ask...&lt;br /&gt;
&lt;br /&gt;
Well, apparently the &lt;em&gt;appSettings&lt;/em&gt; node must be located below the &lt;em&gt;configSections&lt;/em&gt; node. If not, all kind of strange things (like not being able to connect to TFS) will occur. 
    </content:encoded>

    <pubDate>Mon, 18 Jun 2007 14:15:10 +0000</pubDate>
    <guid isPermaLink="false">http://blog.arogldarthu.nl/archives/9-guid.html</guid>
    
</item>
<item>
    <title>BIOS IDE Detection Hell</title>
    <link>http://blog.arogldarthu.nl/archives/8-BIOS-IDE-Detection-Hell.html</link>
            <category>Infra</category>
    
    <comments>http://blog.arogldarthu.nl/archives/8-BIOS-IDE-Detection-Hell.html#comments</comments>
    <wfw:comment>http://blog.arogldarthu.nl/wfwcomment.php?cid=8</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://blog.arogldarthu.nl/rss.php?version=2.0&amp;type=comments&amp;cid=8</wfw:commentRss>
    

    <author>nospam@example.com (Twan Jacobs)</author>
    <content:encoded>
    OK, I admit... It&#039;s been a while since I put together a PC. But this is really too weird. At startup, even before having an OS installed, there was a tremendous delay when the BIOS tried to detect the IDE devices. Just two, a hard disk drive on the primary and a CDROM on the secondary. How hard can that be to detect?&lt;br /&gt;
&lt;br /&gt;
Well appearently very hard, because the waiting started to bother me from the first boot I had to make. So you start tweaking the BIOS settings. The &lt;a href=&quot;http://www.techarp.com/bog.aspx&quot;  title=&quot;BOG&quot;&gt;BIOS Optimization Guide&lt;/a&gt; seemed a good place to start. But allas, whatever I tried it was of no use.&lt;br /&gt;
&lt;br /&gt;
Hours later, after searching the web for known issues with my drives and/or mobo, I finally keyed the right phrase into google and asked &lt;a href=&quot;http://www.google.nl/search?hl=nl&amp;client=firefox-a&amp;channel=s&amp;rls=org.mozilla%3Aen-US%3Aofficial&amp;hs=gji&amp;q=slow+boot+in+bios&amp;btnG=Zoeken&amp;meta=&quot;  title=&quot;Direct Hit&quot;&gt;&#039;slow boot in bios&#039;&lt;/a&gt;. And there my answer was, only one click and some scrolling away. &lt;a href=&quot;http://www.computing.net/windowsxp/wwwboard/forum/136748.html&quot;  title=&quot;Bingo&quot;&gt;Googles first result&lt;/a&gt;, opened a discussion thread called &#039;Slow Booting&#039; and hidden under &#039;Response Number 6&#039; I found what I was looking for.&lt;br /&gt;
&lt;br /&gt;
Hold on: the jumpers on the IDE devices need to be set to &lt;strong&gt;cable select&lt;/strong&gt;. The setting &lt;strong&gt;master&lt;/strong&gt; is not good enough anymore. Why, why, WHY!? 
    </content:encoded>

    <pubDate>Fri, 23 Feb 2007 22:28:22 +0000</pubDate>
    <guid isPermaLink="false">http://blog.arogldarthu.nl/archives/8-guid.html</guid>
    
</item>

</channel>
</rss>