<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Speakers are Speaking in Code . . .</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mollman/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mollman/feed.xml</link>
    <description>John Mollman&amp;#039;s Dispatches from Badger Hall and Redmond</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:20:52 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>cleaning up older .net beta framework installations</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/cleaning-up-older-net-beta-framework-installations</link>
      <pubDate>Tue, 03 Nov 2009 07:54:35 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2009/11/03/cleaning-up-older-net-beta-framework-installations/</guid>
      <description><![CDATA[I’ve been working with Visual Studio 2010 betas for a while now (it’s really great) and have gone...]]></description>
      <content:encoded><![CDATA[<p>I’ve been working with Visual Studio 2010 betas for a while now (it’s really great) and have gone through multiple upgrades of VS and the .Net runtime over the past few months. </p>  <p>While working on a WCF REST service this week I started seeing assembly load errors when IIS was attempting to initialize my service code. The errors in the Event Log looked something like this: “The worker process failed to pre-load .Net Runtime version v4.0.20521.” That seemed a little odd since I’m running version 4.0.21006.&#160; </p>  <p>I double checked that IIS was configured to use v.0.21006 for the Application Pool I was using. It was. Binging around didn’t lead to any quick answers so I’m posting this in hopes that it will now. </p>  <p>Turns out that when you uninstall previous beta versions of VS or the .Net runtime some vestiges remain on your system. In my case %SystemRoot%\Microsoft.Net\Framework and %SystemRoot%\Microsoft.Net\Framework64 contained several v4.0.* subdirectories. IIS appears to have been picking the first subdirectory that matches the major.minor version and attempting to load the runtime from that location.&#160; </p>  <p>Removing the older v4.0 subdirectories (NOT v4.0.21006) cleared up the problem. </p>  <p>Hope that helps someone else. </p>]]></content:encoded>
    </item>
    <item>
      <title>Managing Internal Connection Strings in SQL CLR code during testing</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/managing-internal-connection-strings-in-sql-clr-code-during-testing</link>
      <pubDate>Fri, 23 Mar 2007 15:05:01 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2007/03/23/managing-internal-connection-strings-in-sql-clr-code-during-testing/</guid>
      <description><![CDATA[One thing that’s somewhat painful about testing/debugging SqlClr application code is managing the...]]></description>
      <content:encoded><![CDATA[<p></p> <p>One thing that’s somewhat painful about testing/debugging SqlClr application code is managing the connection strings used for internal DB calls inside the system. SqlClr has the notion of a “context connection” connection string which uses the same connection and execution context as that under which the SqlClr code is executing. We use this a lot inside the <a href="https://blogs.msdn.com/mollman/archive/2006/06/12/628239.aspx">Aggregation system</a> my team developed.  <p>It can make testing difficult, as when you’re unit testing functionality that uses the context connection and you’re hosted not within SqlServer but within a testing framework these internal calls fail with a “context connection is only available when hosted by SqlServer” error.  <p>I’ve come up with an idiom for managing this in my unit tests. Maybe useful to others as well, so here it is.  <p>I have a utility class with a&nbsp;static constructor&nbsp;which figures out if we’re hosted by SqlServer by inspecting the <a href="https://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.server.sqlcontext.isavailable.aspx">SqlContext.IsAvailable property</a> and sets a connection string property appropriately. If we’re not hosted by SqlServer the utility class checks the ConfigurationManager for settings stored in AppSettings in our app.config file and uses those.  <p>Here’s the relevant code:  <p><font face="Courier New">#region Constructors<br>/// &lt;summary&gt;<br>/// Sets up the internal connection string used by the system.</font><font face="Courier New"> <br>/// &lt;/summary&gt;<br>static Utility()<br>{<br>&nbsp; if (SqlContext.IsAvailable)<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; internalConnectionString = "context connection=true";<br>&nbsp; }<br>&nbsp; else<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; try<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SqlConnectionStringBuilder sqlSb = new SqlConnectionStringBuilder(); </font></p> <p><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #if DEBUG<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlSb.Pooling = false;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #endif<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlSb.DataSource = ConfigurationManager.AppSettings["DBServer"];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlSb.InitialCatalog = ConfigurationManager.AppSettings["Database"];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlSb.IntegratedSecurity = true;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; internalConnectionString = sqlSb.ToString();<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp; catch (Exception e)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// log&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;internalConnectionString = "context connection=true";<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp; }<br>} </font> <p><font face="Courier New">#endregion </font> <p><font face="Courier New">#region Properties</font><font face="Courier New"><br></font> <p><font face="Courier New">/// &lt;summary&gt;<br>/// Connection String used for DB calls within the system. <br>/// If hosted by SqlServer this will be a context connection, <br>/// otherwise we assume this is a test run and use a trusted connection<br>/// string with database and server as configured in app.config. <br>/// &lt;/summary&gt;</font>  <p><font face="Courier New">public static string InternalConnectionString<br>{<br>&nbsp; get { return internalConnectionString; }<br>} </font> <p><font face="Courier New">#endregion</font>  <p>Then in the SqlClr code we get the connection string like so:  <p><font face="Courier New">using (SqlConnection conn = new SqlConnection(Utility.InternalConnectionString))</font>; <p> <p>Now&nbsp;our unit tests&nbsp;can operate outside of the SqlServer context. This isn't always appropriate or neccessary, but for our project it's both.  <p>Some caveats/weirdness:  <ol> <li>When hosted in SqlServer you don’t usually have access to config files (or the file system as we know it) so I rename and copy the app.config for my unit test assembly to the output directory and rename it so it looks like the config file for the SqlClr assembly. This is only useful for testing, and the config file that appears to be for the SqlClr code isn’t actually deployed to SqlServer.&nbsp;<br> <li>I wouldn’t ordinarily read config settings in a static .cctor, but in SqlClr you can’t write to static members unless they’re readonly which complicates things somewhat.&nbsp;<br> <li>When debugging SqlClr you want to use a trusted connection when possible, so that’s what we do for test scenario here. This assumes whatever security context the tests are using has necessary permissions on the database.&nbsp;<br> <li>SqlContext.IsAvailable can return false for reasons other than that your code isn't hosted in SqlServer. I haven’t fully explored all the potential failure cases here yet.&nbsp;We protect our system against this in the SqlServer hosted case by defaulting to a context connection if any exception is caught when attempting to initialize the test connection string.  <li>VS won't let you add a reference to the System.Configuration.dll assembly using the normal Add Reference context menu for SqlClr projects. Apparently this assembly was added to the "blessed assemblies" list for SqlServer hosted code late in the game and VS hasn't yet caught up. You'll need to manually edit your .csproj file and add&nbsp; the reference manually like so:  <p><font face="Courier New">&nbsp; &lt;ItemGroup&gt;<br>&nbsp;&nbsp;&nbsp; . . .<br>&nbsp;&nbsp;&nbsp; &lt;Reference Include="System.Configuration" /&gt;<br>&nbsp; &lt;/ItemGroup&gt;</font></p></li></ol>]]></content:encoded>
    </item>
    <item>
      <title>Making Friends in the CLR</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/making-friends-in-the-clr</link>
      <pubDate>Fri, 13 Oct 2006 13:57:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/10/13/making-friends-in-the-clr/</guid>
      <description><![CDATA[My boss and I were lamenting the lack of the "friend" declaration in the CLR languages like C# this...]]></description>
      <content:encoded><![CDATA[<P>My boss and I were lamenting the lack of the "friend" declaration in the CLR languages like C# this week. </P>
<P>We're working on tightening up the Publishing API for the MTPS system (the publishing system behind <A class="" href="https://msdn2.microsoft.com/" mce_href="https://msdn2.microsoft.com">msdn2.microsoft.com)</A> and wanted to be able to restrict access to some utility library methods so that only the core of the system could use them but not external clients. "What we need," I said "is C++'s 'friend' declaration. Too bad we don't have that for managed code." </P>
<P>Turns out we <EM>do</EM> have such functionality. Even better, maybe. </P>
<P>Using the [assembly:InternalsVisibleTo] attribute introduced in .NET 2.0&nbsp;allows to to <A class="" href="https://msdn2.microsoft.com/en-us/library/0tke9fxk.aspx" mce_href="https://msdn2.microsoft.com/en-us/library/0tke9fxk.aspx">declare another assembly a "friend,"</A> meaning that all members declared with internal visibility can be accessed from the friend assembly. Pretty neat. It solved our problem quite well. I'm not sure how I missed this when&nbsp;.NET &nbsp;2.0 came out, but I did. </P>
<P>Note that there are some <A class="" href="https://msdn2.microsoft.com/en-us/library/heyd8kky.aspx" mce_href="https://msdn2.microsoft.com/en-us/library/heyd8kky.aspx">important security caveats</A> to keep in mind when using this attribute. </P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>Doc Watson: Nicest Man in Show Business?</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/doc-watson-nicest-man-in-show-business</link>
      <pubDate>Thu, 20 Jul 2006 13:32:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/07/20/doc-watson-nicest-man-in-show-business/</guid>
      <description><![CDATA[Went with the family to see Doc Watson play at the Woodland Park Zoo last night. The zoo hosts...]]></description>
      <content:encoded><![CDATA[<P>Went with the family to see <A href="https://en.wikipedia.org/wiki/Doc_Watson">Doc Watson </A>play at the Woodland Park Zoo last night. The zoo hosts <A href="https://www.zoo.org/zootunes">concerts </A>featuring some pretty great mid-level touring bands every summer on the <A href="https://local.live.com/default.aspx?v=2&amp;cp=rybft64t3p2f&amp;style=o&amp;lvl=2&amp;scene=3692707">North&nbsp;Meadow</A>, and, since we live a block away,&nbsp;we go to most every show. It's a really kid-friendly scene; I think my son Søren was 4 days old when he saw his first show there (Suzanne Vega). Watson was great, as always, and the kids loved dancing to the familiar music. </P>
<P>At one point Watson&nbsp;fielded a request from the audience with what must be the most polite refusal since Bartleby worked as a scrivener. I'm paraphrasing: </P>
<P>"Well ma'am, thank you for making a request, but I've played that song about 3500 times with Merle, and probably 4000 times since. If it's alright with you I'd prefer not to play it tonight." Jeff Tweedy he ain't. </P>]]></content:encoded>
    </item>
    <item>
      <title>Microsoft to Supply ECUs for Formula One (Sort Of)</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/microsoft-to-supply-ecus-for-formula-one-sort-of</link>
      <pubDate>Thu, 06 Jul 2006 13:54:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/07/06/microsoft-to-supply-ecus-for-formula-one-sort-of/</guid>
      <description><![CDATA[I'm on my annual F1-oriented vacation and travelled to Indianapolis for the USGP again.&nbsp; I'm a...]]></description>
      <content:encoded><![CDATA[I'm on my annual F1-oriented vacation and travelled to Indianapolis for the USGP again.&nbsp; I'm a big fan of Kimi Raikkonen, so the USGP was a real dissapointment. We have great seats at turn one, which is where Juan Pablo Montoya took out Raikkonen (his McLaren teammate) on the first lap. <br><br>Interesting to see that Autosport is <a href="https://www.autosport.com/news/report.php/id/53006">reporting</a> that the FIA has chosen "Microsoft MES" as the official supplier of ECUs for Formula One starting in 2008. Exactly what/who is MES is subject to debate in the F1 press at this point, but Autosport sources report that it's McLaren Electronic Systems; a subsidiary of McLaren International reportedly unrelated to the McLaren Mercedes F1 team. <br><br>Where and how Microsoft fits into this I have no idea, but if anyone involved is reading this: can I come work for you? I'll move to Woking, no worries! <br>]]></content:encoded>
    </item>
    <item>
      <title>WSJ on Craigslist</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/wsj-on-craigslist</link>
      <pubDate>Mon, 19 Jun 2006 16:27:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/06/19/wsj-on-craigslist/</guid>
      <description><![CDATA[File under "Goliath interviews David, Remains Incredulous."
Saturday's Wall Street Journal has...]]></description>
      <content:encoded><![CDATA[<P>File under "Goliath interviews David, Remains Incredulous."</P>
<P>Saturday's Wall Street Journal has an&nbsp;<A href="https://online.wsj.com/public/article/SB115049840863382886-9QyN65ef6meo_D2UlLOxAdRmbN0_20070616.html?mod=rss_free">interview </A>with Craigslist CEO Jim Buckmaster. Brian Carney, the interviewer, seems distinctly ill-at-ease with the notion that Craigslist isn't terribly interested in maximizing revenue. </P>
<P>From the interview: "If Craigslist does what its users ask of it, and Craigslist doesn't need or seem to want all the ad revenue it declines to collect, maybe we, as end-users, should ask them to post some banner ads and give us the money instead." </P>
<P>Is leaving money on the table really such an affront? </P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>]]></content:encoded>
    </item>
    <item>
      <title>MTPS ContentServices and MSDNMan</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/mtps-contentservices-and-msdnman</link>
      <pubDate>Tue, 13 Jun 2006 16:00:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/06/13/mtps-contentservices-and-msdnman/</guid>
      <description><![CDATA[Craig Andera has been working with my team on a set of web services exposing MSDN2 content hosted by...]]></description>
      <content:encoded><![CDATA[<P><A href="https://pluralsight.com/blogs/craig/">Craig Andera </A>has been working with my team on a set of web services exposing <A href="https://msdn2.microsoft.com">MSDN2 </A>content hosted by MTPS (our content publishing and rendering system) to SOAP clients. </P>
<P>Yesterday at TechNet they pulled the wraps off and <A href="https://pluralsight.com/blogs/craig/archive/2006/06/12/27273.aspx">announced the public&nbsp;availability </A>of <A href="https://services.msdn.microsoft.com/ContentServices/ContentService.asmx">these services</A>. I think this is a pretty big deal; we're opening up the corpus of MSDN's developer documentation to clients outside of our control and I'm confident that usage scenarios we've never imagined will emerge as folks play around with these services. </P>
<P>Craig developed a reference implemenation of a client for these services of particular (peculiar?) interest to those of us who've dwelt in the *NIX world and still cling to the command line: <A href="https://pluralsight.com/blogs/craig/archive/2006/06/12/27288.aspx">msdnman</A>. No, it's not a superhero -- it's a command line documentation engine that displays MSDN&nbsp;docs fetched from the&nbsp;Content Services. Craig has<A href="https://wangdera.com/msdnman/"> made&nbsp;the source code available</A> and it provides an excellent example for those interested in writing clients which consume these services. </P>
<P>I've been helping out a little around the periphery of this project and have learned more about&nbsp; XML esoterica than I ever thought possible. Now when&nbsp;I'm asked about REST I'll have a more reasonable answer than "no thanks, I gave it up when my second child was born."</P>]]></content:encoded>
    </item>
    <item>
      <title>MSDN Aggregation System Article</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/msdn-aggregation-system-article</link>
      <pubDate>Mon, 12 Jun 2006 10:43:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/06/12/msdn-aggregation-system-article/</guid>
      <description><![CDATA[An&nbsp;article I wrote for MSDN Magazine covering the metadata aggregation system my team developed...]]></description>
      <content:encoded><![CDATA[<P>An&nbsp;article I wrote for MSDN Magazine covering the metadata aggregation system my team developed has been&nbsp;published. Online version at <A href="https://msdn.microsoft.com/msdnmag/issues/06/07/InsideMSDN/default.aspx">https://msdn.microsoft.com/msdnmag/issues/06/07/InsideMSDN/default.aspx</A>. </P>
<P>This article builds on the<A href="https://blogs.msdn.com/mollman/archive/2006/02/02/523483.aspx"> talk </A>I gave at VSLive in Febrary. </P>
<P>Release of upgraded Related Articles&nbsp;functionality based on this system on <A href="https://msdn2.microsoft.com">MSDN2</A> &nbsp;is planned for later this month. </P>]]></content:encoded>
    </item>
    <item>
      <title>Jeff Tweedy at the Moore</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/jeff-tweedy-at-the-moore</link>
      <pubDate>Fri, 03 Feb 2006 18:00:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/02/03/jeff-tweedy-at-the-moore/</guid>
      <description><![CDATA[It's been a Wilco-oriented week. 
Followed up Monday's Nels Cline show with a Jeff&nbsp; Tweedy...]]></description>
      <content:encoded><![CDATA[<p>It's been a Wilco-oriented week. </p>
<p>Followed up Monday's Nels Cline show with a Jeff&nbsp; Tweedy solo show last night. As an added bonus Wilco's drummer Glenn Kotche opened and sat in for a few songs with Tweedy. </p>
<p>Now you might be thinking A drummer opened? By himself? What was it, a 45 minute drum solo? Well, sort of. It was drums and temple bells and hoses rubbed on snares and hubcaps being whacked with egg beaters and all manner of wierdness and it was amazingly melodic. </p>
<p>Tweedy was great and played both acoustic-friendly fare like <em>Acuff Rose</em> and some usually heavily electrified stuff like <em>Shot in the Arm</em> and <em>I'm the Man Who Loves You</em> that were amazingly good in their solo acoustic arrangements. </p>
<p>One thing Larry and I both lamented a bit was that Tweedy's renown for "baiting" his audiences seems to bring out the people interested in participating by trying to be obnoxious enough for Tweedy to notice them and tell them to shut up. It's&nbsp;a strange notariety,&nbsp;but maybe there are people bragging to their friends that "Jeff Tweedy called&nbsp;me the snaggle toothed voice of the abyss last&nbsp;night"! Tweedy was good natured about it,&nbsp;and used it as therapy I guess, but it must get pretty old. </p>
<p>Oh, and Tweedy's growin' a beard (Bob Dylan's 50th?)</p>
<p><a href="https://wilcobase.com/event.php?event_key=910">Here's the setlist.</a> </p>]]></content:encoded>
    </item>
    <item>
      <title>VSLive Talk Resources</title>
      <link>https://docs.microsoft.com/archive/blogs/mollman/vslive-talk-resources</link>
      <pubDate>Thu, 02 Feb 2006 13:58:00 GMT</pubDate>
      <dc:creator><![CDATA[John Mollman [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/mollman/2006/02/02/vslive-talk-resources/</guid>
      <description><![CDATA[I promised to post links to some of the resources I mentioned in my talk at VSLive this week. Here...]]></description>
      <content:encoded><![CDATA[<p>I promised to post links to some of the resources I mentioned in my talk at VSLive this week. Here they are:</p>
<ul>
<li><a href="https://mollman.members.winisp.net/vslive2006/VSLive_2006_SFO_john_mollman.ppt">Presentation deck </a>(.ppt)</li>
<li><a href="https://mollman.members.winisp.net/vslive2006/VSLive_2006_SFO_john_mollman.htm">Presentation deck </a>(.htm)</li>
<li>Chris Brumme's <a HREF="/cbrumme/archive/2004/02/21/77595.aspx">blog post </a>on SQL Server's hosting of the CLR</li>
<li>MSDN2 docs on<a href="https://msdn2.microsoft.com/en-us/library/ms165050.aspx"> SQL CLR debugging </a></li>
<li><a href="https://msdn2.microsoft.com/en-us/library/ms166100.aspx">Service Broker Dev Center </a>on MSDN2</li></ul>
<p>I'm awaiting legal clearance to post the code I used in the demo, and will post as soon as it's granted. </p>
<p>If you attended my talk and have questions or feedback, feel free to get in touch via the email link above. </p>]]></content:encoded>
    </item>
  </channel>
</rss>