<?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 - WTF</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>Mon, 18 Jun 2007 15:16:02 GMT</pubDate>

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

<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>Accessing ASP3.0 Session Object from .NET component</title>
    <link>http://blog.arogldarthu.nl/archives/5-Accessing-ASP3.0-Session-Object-from-.NET-component.html</link>
            <category>WTF</category>
    
    <comments>http://blog.arogldarthu.nl/archives/5-Accessing-ASP3.0-Session-Object-from-.NET-component.html#comments</comments>
    <wfw:comment>http://blog.arogldarthu.nl/wfwcomment.php?cid=5</wfw:comment>

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

    <author>nospam@example.com (Twan Jacobs)</author>
    <content:encoded>
    New project, new challenge... How true. A coworker came to me with the following issue:&lt;br /&gt;
In an ASP3.0 web application we call a .NET component and we want to access the intrinsic ASP objects (for instance the Session object) from there. Now in a legacy VB COM component you would just reference mtsax.dll, declare a variable as ObjectContext and call GetObjectContext.&lt;br /&gt;
&lt;div class=&quot;vb&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #000080;&quot;&gt;Private&lt;/span&gt; ObjectContext &lt;span style=&quot;color: #000080;&quot;&gt;As&lt;/span&gt; MTxAS.ObjectContext&lt;br /&gt;&lt;span style=&quot;color: #000080;&quot;&gt;Private&lt;/span&gt; Session &lt;span style=&quot;color: #000080;&quot;&gt;As&lt;/span&gt; ASPTypeLibrary.Session&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #000080;&quot;&gt;Set&lt;/span&gt; ObjectContext = GetObjectContext()&lt;br /&gt;&lt;span style=&quot;color: #000080;&quot;&gt;Set&lt;/span&gt; Session = ObjectContext(&amp;quot;Session&amp;quot;)&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
After reading a lot about session integration between ASP.NET and ASP3.0 (which I was not looking for), the answer turned out to be extremely simple. Sometimes it is just a matter of looking at the right place. To quote &lt;a href=&quot;http://weblogs.asp.net/israelio&quot;  target=&quot;_blank&quot;  title=&quot;Ohad&#039;s weblog&quot;&gt;Ohad Israeli&lt;/a&gt;, who pointed me in the right direction:&lt;br /&gt;
&lt;blockquote&gt;The answer is always there…&lt;br /&gt;
the problem is that you just don’t look at the right place &lt;img src=&quot;http://blog.arogldarthu.nl/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div class=&quot;vbnet&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #0600FF;&quot;&gt;Dim&lt;/span&gt; objAppServer &lt;span style=&quot;color: #FF8000;&quot;&gt;As&lt;/span&gt; COMSVCSLib.&lt;span style=&quot;color: #0000FF;&quot;&gt;AppServer&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0600FF;&quot;&gt;Dim&lt;/span&gt; objContext &lt;span style=&quot;color: #FF8000;&quot;&gt;As&lt;/span&gt; COMSVCSLib.&lt;span style=&quot;color: #0000FF;&quot;&gt;ObjectContext&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0600FF;&quot;&gt;Dim&lt;/span&gt; objSession &lt;span style=&quot;color: #FF8000;&quot;&gt;As&lt;/span&gt; ASPTypeLibrary.&lt;span style=&quot;color: #0000FF;&quot;&gt;Session&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;objAppServer &lt;span style=&quot;color: #008000;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #FF8000;&quot;&gt;New&lt;/span&gt; COMSVCSLib.&lt;span style=&quot;color: #0000FF;&quot;&gt;AppServer&lt;/span&gt;&lt;br /&gt;objContext &lt;span style=&quot;color: #008000;&quot;&gt;=&lt;/span&gt; objAppServer.&lt;span style=&quot;color: #0000FF;&quot;&gt;GetObjectContext&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;objSession &lt;span style=&quot;color: #008000;&quot;&gt;=&lt;/span&gt; objContext&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #808080;&quot;&gt;&amp;quot;Session&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;&amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #008080; font-style: italic;&quot;&gt;&#039;Obtain ASP Session object.&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 13 Dec 2006 09:29:42 +0000</pubDate>
    <guid isPermaLink="false">http://blog.arogldarthu.nl/archives/5-guid.html</guid>
    
</item>
<item>
    <title>Remoting Configuration Loaded Too Little Too Late</title>
    <link>http://blog.arogldarthu.nl/archives/2-Remoting-Configuration-Loaded-Too-Little-Too-Late.html</link>
            <category>WTF</category>
    
    <comments>http://blog.arogldarthu.nl/archives/2-Remoting-Configuration-Loaded-Too-Little-Too-Late.html#comments</comments>
    <wfw:comment>http://blog.arogldarthu.nl/wfwcomment.php?cid=2</wfw:comment>

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

    <author>nospam@example.com (Twan Jacobs)</author>
    <content:encoded>
    How strange... The program works perfectly in debug mode, but in release mode I get a &lt;strong&gt;TypeInitializationException&lt;/strong&gt;. Why?&lt;br /&gt;
&lt;br /&gt;
The exception originates at the construction of an object (&lt;em&gt;BatchRunner&lt;/em&gt;) that tries to instantiate a remotable object. This remotable object is declared as a &lt;strong&gt;private static&lt;/strong&gt; variable:&lt;br /&gt;
&lt;div class=&quot;csharp&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #008080;&quot;&gt;#region Private Static Fields&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0600FF;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: #0600FF;&quot;&gt;static&lt;/span&gt; RemotingWrapper Wrapper &lt;span style=&quot;color: #008000;&quot;&gt;=&lt;/span&gt; CreateRemotingWrapper&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #008000;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #008080;&quot;&gt;#endregion&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
And herein lies the problem. The call to &lt;em&gt;CreateRemotingWrapper()&lt;/em&gt; fires when the implicit static constuctor is called. In release mode the compiler makes certain optimizations that it does not make in debug mode. Apparently causing implicit static constructors to execute very, very early. &lt;br /&gt;&lt;a href=&quot;http://blog.arogldarthu.nl/archives/2-Remoting-Configuration-Loaded-Too-Little-Too-Late.html#extended&quot;&gt;Continue reading &quot;Remoting Configuration Loaded Too Little Too Late&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 21 Sep 2006 18:55:00 +0000</pubDate>
    <guid isPermaLink="false">http://blog.arogldarthu.nl/archives/2-guid.html</guid>
    
</item>

</channel>
</rss>