<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Adrian Henke's Blog</title>
	<atom:link href="http://adrianhenke.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://adrianhenke.wordpress.com</link>
	<description>code, thoughts and random stuff</description>
	<lastBuildDate>Wed, 14 Oct 2009 16:50:32 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='adrianhenke.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/495ef3d47e0153f6b605d861712beaf2?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Adrian Henke's Blog</title>
		<link>http://adrianhenke.wordpress.com</link>
	</image>
			<item>
		<title>Sharepoint Designer, changing list forms does not work</title>
		<link>http://adrianhenke.wordpress.com/2009/10/14/sharepoint-designer-changing-list-forms-does-not-work/</link>
		<comments>http://adrianhenke.wordpress.com/2009/10/14/sharepoint-designer-changing-list-forms-does-not-work/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:50:04 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[custom list forms]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[webpart]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=135</guid>
		<description><![CDATA[In Sharepoint Designer, you can specify the path to the display item form, edit item form and new item form. You find these settings in the list properties under &#8220;supporting files&#8221;.
However sometimes sharepoint silently discards your changes and uses the original form again. No matter how often you specify your custom form, it will be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=135&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In Sharepoint Designer, you can specify the path to the <em>display item form</em>, <em>edit item form</em> and <em>new item form.</em> You find these settings in the list properties under &#8220;supporting files&#8221;.</p>
<p>However sometimes sharepoint silently discards your changes and uses the original form again. No matter how often you specify your custom form, it will be changed back to the original form. If this happens to you, try the following:</p>
<ul>
<li>Make sure your form contains the original ListFormWebPart, set its <em>IsIncluded</em> property to false.</li>
<li>Open your form in design view and make sure that none of the components (like custom webparts) throw an exception during rendering</li>
</ul>
<p>If sharepoint encounters one of the issues above, it might reset the supporting files url back to the original values. Let me know if there are more conditions that cause this issue..</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=135&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/10/14/sharepoint-designer-changing-list-forms-does-not-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Sharepoint InternalName vs. DisplayName</title>
		<link>http://adrianhenke.wordpress.com/2009/10/14/sharepoint-internalname-vs-displayname/</link>
		<comments>http://adrianhenke.wordpress.com/2009/10/14/sharepoint-internalname-vs-displayname/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 14:36:06 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=131</guid>
		<description><![CDATA[This blogpost describes the internalname vs. displayname problem in the Sharepoint object model, nice to know&#8230;
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=131&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This <a href="http://tomblog.insomniacminds.com/2008/01/25/sharepoint-internals-internalname-versus-displayname/">blogpost</a> describes the internalname vs. displayname problem in the Sharepoint object model, nice to know&#8230;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=131&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/10/14/sharepoint-internalname-vs-displayname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>The request failed with HTTP status 401: Unauthorized in Report Services 2008 Sharepoint Integration</title>
		<link>http://adrianhenke.wordpress.com/2009/06/13/the-request-failed-with-http-status-401-unauthorized-in-report-services-2008-sharepoint-integration/</link>
		<comments>http://adrianhenke.wordpress.com/2009/06/13/the-request-failed-with-http-status-401-unauthorized-in-report-services-2008-sharepoint-integration/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:39:57 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Reporting Services]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[wss]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=122</guid>
		<description><![CDATA[Today I tried to integrate Reporting Services and Sharepoint. The setup consisted of three servers:

SQL 2008
Reporting Services 2008
Sharepoint (WSS 3.0) with Reporting Services Addins

When I tried to connect Sharepoint to the Reporting Services Webservice using the Central Administration, I got the following error:
The request failed with HTTP status 401: Unauthorized
However when I manually visited the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=122&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I tried to integrate Reporting Services and Sharepoint. The setup consisted of three servers:</p>
<ul>
<li>SQL 2008</li>
<li>Reporting Services 2008</li>
<li>Sharepoint (WSS 3.0) with Reporting Services Addins</li>
</ul>
<p>When I tried to connect Sharepoint to the Reporting Services Webservice using the Central Administration, I got the following error:</p>
<p><strong>The request failed with HTTP status 401: Unauthorized</strong></p>
<p>However when I manually visited the webservice through the browser @ <em>http://myserver/ReportServer,</em> everything worked fine. So why did the authentication fail for Sharepoint?</p>
<p>My Sharepoint setup uses NTLM authentication only, therefore Reporting Services must be configured for the same authentication type as well. After reading through tons of KB articles and posts, i finally <a href="http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/4e2b506b-7b33-4ca7-8790-a5d28b2d65bc">found</a> a solution to the problem:</p>
<ol>
<li>On the Reporting Services Server, open the config file <em>rsreportserver.config</em> (you find it in the Reporting Services folder)</li>
<li>Look for the <strong>Autentication </strong>configuration node</li>
<li>Remove the <strong>RSWindowsNegotiate</strong> setting</li>
</ol>
<p>The config section in question should now look like this:</p>
<pre class="brush: xml;">
&lt;Authentication&gt;
  &lt;AuthenticationTypes&gt;
    &lt;!-- &lt;RSWindowsNegotiate/&gt; --&gt;
    &lt;RSWindowsNTLM/&gt;
  &lt;/AuthenticationTypes&gt;
  &lt;EnableAuthPersistence&gt;true&lt;/EnableAuthPersistence&gt;
&lt;/Autentication&gt;
</pre>
<p>That way, only NTLM is used for authentication. This fixed it for me <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=122&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/06/13/the-request-failed-with-http-status-401-unauthorized-in-report-services-2008-sharepoint-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Add existing users to Sharepoint in &#8220;Active Directory Account Creation Mode&#8221;</title>
		<link>http://adrianhenke.wordpress.com/2009/05/17/add-existing-users-to-sharepoint-in-active-directory-account-creation-mode/</link>
		<comments>http://adrianhenke.wordpress.com/2009/05/17/add-existing-users-to-sharepoint-in-active-directory-account-creation-mode/#comments</comments>
		<pubDate>Sun, 17 May 2009 19:58:41 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[stsadm]]></category>
		<category><![CDATA[wss]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=115</guid>
		<description><![CDATA[If you run a WSS 3.0 Farm in the so called Active Directory Account Creation Mode you can not add existing users to your site collection. You are restricted to users that were created in the respective site collection.
To work around this limitation, you can abuse the stsadm utility to publish an existing user into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=115&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you run a WSS 3.0 Farm in the so called <em>Active Directory Account Creation Mode</em> you can not add existing users to your site collection. You are restricted to users that were created in the respective site collection.</p>
<p>To work around this limitation, you can abuse the stsadm utility to publish an existing user into a site collection:</p>
<ol>
<li>Log in to your portal and create a new user, name it &#8220;dummy&#8221; with a non-existing E-Mail address like dummy@dummy.local</li>
<li>On your Webserver, start a command prompt and navigate to <em>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Bin</em></li>
<li>From there, run the STSADM utilty:</li>
</ol>
<pre class="brush: bash;">
stsadm.exe -o migrateuser -oldlogin MYDOMAIN\dummy -newlogin MYDOMAIN\myExistingUser -ignoresidhistory
</pre>
<p>This will replace all Sharepoint-internal references to the dummy user by references your existing user. That way your existing user is visible in the isolated site collection.</p>
<p>Some notes about this techniques:</p>
<ul>
<li>User attributes such as E-Mail, Title, Position, etc will not be updated along with the user SID.</li>
<li>If a user called <em>dummy</em> already existed, Sharepoint will create a User like <em>dummy1</em> instead. I suggest you take a look at the <em>dummy</em> users creation date in Active Directory before issuing the stadm command.</li>
<li>Delete the dummy user after the migration.</li>
<li>The user references are being updated in the <strong>whole Sharepoint Farm.</strong></li>
<li>If you dont specify -ignoresidhistory, the SID histories of both users will be compared for matches. And if there are no matches, the operation will fail.</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=115&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/05/17/add-existing-users-to-sharepoint-in-active-directory-account-creation-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Code faster!</title>
		<link>http://adrianhenke.wordpress.com/2009/05/01/code-faster/</link>
		<comments>http://adrianhenke.wordpress.com/2009/05/01/code-faster/#comments</comments>
		<pubDate>Fri, 01 May 2009 16:43:58 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=113</guid>
		<description><![CDATA[A small hint for C# developers, check out the Visual C# 2008 Keybinding Reference Poster and hang it on your wall, I&#8217;m sure there are some shortcuts you didn&#8217;t know yet.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=113&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A small hint for C# developers, check out the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=E5F902A8-5BB5-4CC6-907E-472809749973&amp;displaylang=en">Visual C# 2008 Keybinding Reference Poster</a> and hang it on your wall, I&#8217;m sure there are some shortcuts you didn&#8217;t know yet.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/113/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/113/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/113/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=113&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/05/01/code-faster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Right-align a TextBlock in Silverlight</title>
		<link>http://adrianhenke.wordpress.com/2009/03/28/right-align-a-textblock-in-silverlight/</link>
		<comments>http://adrianhenke.wordpress.com/2009/03/28/right-align-a-textblock-in-silverlight/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 20:43:38 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[textblock]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=105</guid>
		<description><![CDATA[There is currently no way to right-align a TextBlock UI Element in Silverlight, though you can use this workaround to properly position your TextBlock to make it appear right-aligned:
The XAML

&#60;Canvas&#62;
    &#60;TextBlock Text=&#34;My Text&#34; Loaded=&#34;TextBlock_Loaded&#34; Width=&#34;80&#34;/&#62;
&#60;/Canvas&#62;

The Loaded event handler

       private void TextBlock_Loaded(object sender, RoutedEventArgs e)
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=105&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There is currently no way to right-align a TextBlock UI Element in Silverlight, though you can use this workaround to properly position your TextBlock to make it appear right-aligned:</p>
<p>The XAML</p>
<pre class="brush: xml;">
&lt;Canvas&gt;
    &lt;TextBlock Text=&quot;My Text&quot; Loaded=&quot;TextBlock_Loaded&quot; Width=&quot;80&quot;/&gt;
&lt;/Canvas&gt;
</pre>
<p>The <strong>Loaded</strong> event handler</p>
<pre class="brush: csharp;">
       private void TextBlock_Loaded(object sender, RoutedEventArgs e)
        {
            TextBlock tb = (TextBlock) sender;
            Canvas.SetLeft(tb, Canvas.GetLeft(tb) + tb.Width - tb.ActualWidth);
        }
</pre>
<p>By wrapping the TextBlock in the Canvas container, you can fix its position easily.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=105&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/03/28/right-align-a-textblock-in-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Dealing with DBNull in DataReaders</title>
		<link>http://adrianhenke.wordpress.com/2009/03/26/dealing-with-dbnull-in-datareaders/</link>
		<comments>http://adrianhenke.wordpress.com/2009/03/26/dealing-with-dbnull-in-datareaders/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 21:49:12 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[extension method]]></category>
		<category><![CDATA[generics]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=99</guid>
		<description><![CDATA[When dealing with IDataReaders in .NET, one faces the problem of catching DBNull values and properly converting them to &#8216;native null&#8217;:

int? myNullableField = (int?) reader[&#34;myField&#34;]; // will FAIL if DBNull is being returned..

This extension method eases this pain and allows to retrieve the values in a null-safe way:

    public static class IDataReaderExtensions
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=99&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When dealing with IDataReaders in .NET, one faces the problem of catching DBNull values and properly converting them to &#8216;native null&#8217;:</p>
<pre class="brush: csharp;">
int? myNullableField = (int?) reader[&quot;myField&quot;]; // will FAIL if DBNull is being returned..
</pre>
<p>This extension method eases this pain and allows to retrieve the values in a null-safe way:</p>
<pre class="brush: csharp;">
    public static class IDataReaderExtensions
    {
        public static Nullable&lt;T&gt; GetNullableValue&lt;T&gt; (this IDataReader reader, string fieldName) where T : struct
        {
            object value = reader[fieldName];
            if (value == DBNull.Value)
                return null;

            return (T) value;
        }
    }
</pre>
<p>Using the above extension, you can now simply use the reader this way:</p>
<pre class="brush: csharp;">
int? myNullableField = reader.GetNullableValue&lt;int&gt;(&quot;myField&quot;);
</pre>
<p>The Nullable generic type does not work with certain types such as string, therefore the constraint <em>T : struct</em> is really essential to get it working. I borrowed this constraint trick from stackoverflow.com</p>
<p>Happy coding..</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=99&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/03/26/dealing-with-dbnull-in-datareaders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight object-tag problems in Firefox</title>
		<link>http://adrianhenke.wordpress.com/2009/03/08/silverlight-object-tag-problems-in-firefox/</link>
		<comments>http://adrianhenke.wordpress.com/2009/03/08/silverlight-object-tag-problems-in-firefox/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 16:27:07 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=93</guid>
		<description><![CDATA[Silverlight apps are embedded into web pages using the &#60;object&#62; tag. Now for some reason, Firefox refuses to instantiate the Silverlight application if the object-tag attributes are not in a certain order. As example, this won&#8217;t work in Firefox:

&#60;object width=&#34;100%&#34; height=&#34;100%&#34;
data=&#34;data:application/x-silverlight-2&#34; type=&#34;application/x-silverlight-2&#34;&#62;

One has to position the data and  type attributes first to make it work, like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=93&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Silverlight apps are embedded into web pages using the <em>&lt;object&gt;</em> tag. Now for some reason, Firefox refuses to instantiate the Silverlight application if the object-tag attributes are not in a certain order. As example, this won&#8217;t work in Firefox:</p>
<pre class="brush: xml;">
&lt;object width=&quot;100%&quot; height=&quot;100%&quot;
data=&quot;data:application/x-silverlight-2&quot; type=&quot;application/x-silverlight-2&quot;&gt;
</pre>
<p>One has to position the data and  type attributes first to make it work, like this:</p>
<pre class="brush: xml;">
&lt;object data=&quot;data:application/x-silverlight-2&quot; type=&quot;application/x-silverlight-2&quot;
width=&quot;100%&quot; height=&quot;100%&quot;&gt;
</pre>
<p>Strange bug..</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=93&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2009/03/08/silverlight-object-tag-problems-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating SVN patches and saving them as ZIP file</title>
		<link>http://adrianhenke.wordpress.com/2008/12/11/creating-svn-patches-and-saving-them-as-zip-file/</link>
		<comments>http://adrianhenke.wordpress.com/2008/12/11/creating-svn-patches-and-saving-them-as-zip-file/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 00:53:21 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[patching]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[source control]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=71</guid>
		<description><![CDATA[I use SVN as source control system for one of my projects. Sometimes I want to create patches in form of a zip file containing the changed/new files. Doing so manually is a pain and error prone. First you have to diff between your branches to find all change since your last release, export those [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=71&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I use SVN as source control system for one of my projects. Sometimes I want to create patches in form of a zip file containing the changed/new files. Doing so manually is a pain and error prone. First you have to diff between your branches to find all change since your last release, export those files from SVN, then package them into a proper structured ZIP file.<br />
So here is a PowerShell snippet doing exactly that automatically:</p>
<pre class="brush: jscript;">
function new-patch
{
    param($from, $to)
    # get diff summary as XML
    [xml] $summary = (svn diff $to $from -x --ignore-eol-style --xml --summarize)
    # loop through all diff/paths/path nodes
    # each node represents a modified/new file
    foreach($item in $summary.diff.paths.path)
    {
        # the SVN url
        $url=$item.&quot;#text&quot;
        # the relative filename
        $file=($item.&quot;#text&quot;.Substring($to.Length))
        # the parent directory
        $dir=($file | split-path -parent)
        # create parent directory if it doesn't exist already
        if((test-path $dir) -eq $false) { mkdir $dir -force}
        # export current files from the SVN repository
        svn export $url $file
    }
    # package the current dir (.) into patch.zip
    sevenzip.exe a patch.zip .
}
</pre>
<p>The function is then used like this:</p>
<pre class="brush: jscript;">
PS&gt; new-patch &quot;https://actiongame.svn.sourceforge.net/svnroot/
actiongame/tags/v01_00_00/&quot; &quot;https://actiongame.svn.sourceforge.net/svnroot/actiongame/branches/v01_00_xx/&quot;
</pre>
<p>I specified the old branch as first argument and the new branch as second argument. Now after processing I get all the changes as proper filetree inside a zip file. Ready to ship..</p>
<p>The whole process could be optimized quite a bit. Right now a new SVN request is sent for each single file, it could as well be batched into one request to improve the export performance.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=71&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2008/12/11/creating-svn-patches-and-saving-them-as-zip-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
		<item>
		<title>Create .lib file from .dll</title>
		<link>http://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll/</link>
		<comments>http://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 20:50:59 +0000</pubDate>
		<dc:creator>adrianhenke</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[lib]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[linking]]></category>

		<guid isPermaLink="false">http://adrianhenke.wordpress.com/?p=65</guid>
		<description><![CDATA[When working with 3rd party win dll&#8217;s you somtimes miss the according .lib file required to compile against it. There is a MS KB article showing how to generate a .lib file from a .dll, however the required steps are not described detailed enough I think. So here is my quick guide:
Open the Visual Studio [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=65&subd=adrianhenke&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When working with 3rd party win dll&#8217;s you somtimes miss the according .lib file required to compile against it. There is a <a title="dll to lib" href="http://support.microsoft.com/?scid=kb%3Ben-us%3B131313&amp;x=1&amp;y=15" target="_self">MS KB</a> article showing how to generate a .lib file from a .dll, however the required steps are not described detailed enough I think. So here is my quick guide:</p>
<p>Open the Visual Studio Command Prompt, you find its shortcut in <em>Start-&gt;Programs-&gt;Microsoft Visual Studio-&gt;Tools</em>. Now run the dumpbin command to get a list of all exported functions of your dll:</p>
<p><code><br />
dumpbin /exports C:\yourpath\yourlib.dll<br />
</code></p>
<p>This will print quite a bit of text to the console. However we are only interested in the functions:</p>
<pre>
<code>
ordinal hint RVA      name

1    0 00017770 jcopy_block_row
2    1 00017710 jcopy_sample_rows
3    2 000176C0 jdiv_round_up
4    3 000156D0 jinit_1pass_quantizer
5    4 00016D90 jinit_2pass_quantizer
6    5 00005750 jinit_c_coef_controller
...etc
</code>
</pre>
<p>Now copy all those function names (only the names!) and paste them into a new textfile. Name the nextfile yourlib.def and put the line &#8220;EXPORTS&#8221; at its top. My yourlib.def file looks like this:</p>
<p><code><br />
EXPORTS<br />
jcopy_block_row<br />
jcopy_sample_rows<br />
jdiv_round_up<br />
jinit_1pass_quantizer<br />
jinit_2pass_quantizer<br />
jinit_c_coef_controller<br />
...<br />
</code></p>
<p>Now from that definition file, we can finally create the .lib file. We use the &#8220;lib&#8221; tool for this, so run this command in your Visual Studio Command Prompt:</p>
<p><code><br />
lib /def:C:\mypath\mylib.def /OUT:C:\mypath\mylib.lib<br />
</code></p>
<p>That&#8217;s it, happy coding <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/adrianhenke.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/adrianhenke.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/adrianhenke.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/adrianhenke.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/adrianhenke.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/adrianhenke.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/adrianhenke.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/adrianhenke.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/adrianhenke.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/adrianhenke.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=adrianhenke.wordpress.com&blog=3454522&post=65&subd=adrianhenke&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://adrianhenke.wordpress.com/2008/12/05/create-lib-file-from-dll/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6976292d6b7bb0915bdc8ca78a9227e1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">AdrianHenke</media:title>
		</media:content>
	</item>
	</channel>
</rss>