<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>trace of thought (Scott Colestock) - General</title>
    <link>http://www.traceofthought.net/</link>
    <description>a trace of thought on...BizTalk Server, Team Foundation Server, AppFabric, etc.</description>
    <language>en-us</language>
    <copyright>Scott Colestock</copyright>
    <lastBuildDate>Wed, 13 May 2009 14:24:59 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.0.7226.0</generator>
    <managingEditor>scolestock@marcatopartners.net</managingEditor>
    <webMaster>scolestock@marcatopartners.net</webMaster>
    <item>
      <trackback:ping>http://www.traceofthought.net/Trackback.aspx?guid=26a916ed-d73a-4711-8429-53f59e5c8bfb</trackback:ping>
      <pingback:server>http://www.traceofthought.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.traceofthought.net/PermaLink,guid,26a916ed-d73a-4711-8429-53f59e5c8bfb.aspx</pingback:target>
      <dc:creator>Scott Colestock</dc:creator>
      <wfw:comment>http://www.traceofthought.net/CommentView,guid,26a916ed-d73a-4711-8429-53f59e5c8bfb.aspx</wfw:comment>
      <wfw:commentRss>http://www.traceofthought.net/SyndicationService.asmx/GetEntryCommentsRss?guid=26a916ed-d73a-4711-8429-53f59e5c8bfb</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">You see quite a few code samples for retrieving
"FullName" (or other properties) from an Active Directory that look like this:<br /><pre>string directoryPath = "WinNT://somedomain/someuser";<br />
string fullName;<br /><br />
DirectoryEntry directoryEntry = new DirectoryEntry(directoryPath);<br />
if (directoryEntry.Properties["FullName"].Value != null)<br />
{<br />
fullName = directoryEntry.Properties["FullName"].Value.ToString();<br />
}<br /></pre><p>
One issue with this code is that when "somedomain" actually corresponds to the local
machine name (because your are trying to retrieve the "FullName" of a local account),
it can take an extremely long time to run. This is probably because the underlying
framework is off trying to find a domain controller before falling back to the local
security store.
</p><p>
To work around this, consider code that would look like the following when formulating
the directory path:
</p><pre>string[] identities = windowsIdentity.Name.Split('\\');<br />
string directoryPath;<br />
if(Environment.UserDomainName.Equals(Environment.MachineName,StringComparison.OrdinalIgnoreCase))<br />
{<br />
// special case needed for "off domain" case.<br />
directoryPath = "WinNT://localhost/" + identities[1];<br />
}<br />
else<br />
{<br />
directoryPath = "WinNT://" + identities[0] + "/" + identities[1];<br />
}<br /></pre>
Using "localhost" will cause the property retrieval to be just about instantaneous,
whereas using the computer name (from a local account Windows identity) results in
up to a twelve second delay.<br /><p></p><img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=26a916ed-d73a-4711-8429-53f59e5c8bfb" /></body>
      <title>Retrieving "FullName" property for a local account...</title>
      <guid isPermaLink="false">http://www.traceofthought.net/PermaLink,guid,26a916ed-d73a-4711-8429-53f59e5c8bfb.aspx</guid>
      <link>http://www.traceofthought.net/2009/05/13/RetrievingFullNamePropertyForALocalAccount.aspx</link>
      <pubDate>Wed, 13 May 2009 14:24:59 GMT</pubDate>
      <description>You see quite a few code samples for retrieving "FullName" (or other properties) from an Active Directory that look like this:&lt;br&gt;
&lt;pre&gt;string directoryPath = "WinNT://somedomain/someuser";&lt;br&gt;
string fullName;&lt;br&gt;
&lt;br&gt;
DirectoryEntry directoryEntry = new DirectoryEntry(directoryPath);&lt;br&gt;
if (directoryEntry.Properties["FullName"].Value != null)&lt;br&gt;
{&lt;br&gt;
fullName = directoryEntry.Properties["FullName"].Value.ToString();&lt;br&gt;
}&lt;br&gt;
&lt;/pre&gt;
&lt;p&gt;
One issue with this code is that when "somedomain" actually corresponds to the local
machine name (because your are trying to retrieve the "FullName" of a local account),
it can take an extremely long time to run. This is probably because the underlying
framework is off trying to find a domain controller before falling back to the local
security store.
&lt;/p&gt;
&lt;p&gt;
To work around this, consider code that would look like the following when formulating
the directory path:
&lt;/p&gt;
&lt;pre&gt;string[] identities = windowsIdentity.Name.Split('\\');&lt;br&gt;
string directoryPath;&lt;br&gt;
if(Environment.UserDomainName.Equals(Environment.MachineName,StringComparison.OrdinalIgnoreCase))&lt;br&gt;
{&lt;br&gt;
// special case needed for "off domain" case.&lt;br&gt;
directoryPath = "WinNT://localhost/" + identities[1];&lt;br&gt;
}&lt;br&gt;
else&lt;br&gt;
{&lt;br&gt;
directoryPath = "WinNT://" + identities[0] + "/" + identities[1];&lt;br&gt;
}&lt;br&gt;
&lt;/pre&gt;
Using "localhost" will cause the property retrieval to be just about instantaneous,
whereas using the computer name (from a local account Windows identity) results in
up to a twelve second delay.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=26a916ed-d73a-4711-8429-53f59e5c8bfb" /&gt;</description>
      <comments>http://www.traceofthought.net/CommentView,guid,26a916ed-d73a-4711-8429-53f59e5c8bfb.aspx</comments>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.traceofthought.net/Trackback.aspx?guid=8e2240f3-c7b8-4aa7-94b6-06fac6080bac</trackback:ping>
      <pingback:server>http://www.traceofthought.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.traceofthought.net/PermaLink,guid,8e2240f3-c7b8-4aa7-94b6-06fac6080bac.aspx</pingback:target>
      <dc:creator>Scott Colestock</dc:creator>
      <wfw:comment>http://www.traceofthought.net/CommentView,guid,8e2240f3-c7b8-4aa7-94b6-06fac6080bac.aspx</wfw:comment>
      <wfw:commentRss>http://www.traceofthought.net/SyndicationService.asmx/GetEntryCommentsRss?guid=8e2240f3-c7b8-4aa7-94b6-06fac6080bac</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I had a chance to do a talk on profiling
code for Microsoft's "<a href="http://www.slickthought.net/post/2009/02/Minneapolis-and-Saint-Louis-Build-Your-Skills-Best-Practices-for-NET-Developers-Events.aspx">Build
Your Skills</a>" event on March 24th in St. Louis (and March 31st in Minneapolis). 
I mentioned a utility I'd written for cleaning up performance session files that are
generated from URLs (so that only DLL/EXE remain.)  You can find that <a href="misc/fixpsess.zip">here</a>. 
In addition, you can find the slides <a href="misc/SColestockCodeProfilingTalk.pdf">here</a>. 
All sorts of fun details on profiling terminology, types of profiles, resigning assemblies
(or turning off assembly verification), etc.  I'm hoping to record a screen cast
of the talk soon...<br /><br />
Fantastic turnout at both locations, and really great questions - thanks to those
who attended!<br /><p></p><img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=8e2240f3-c7b8-4aa7-94b6-06fac6080bac" /></body>
      <title>Code Profiling talk (and utility)...</title>
      <guid isPermaLink="false">http://www.traceofthought.net/PermaLink,guid,8e2240f3-c7b8-4aa7-94b6-06fac6080bac.aspx</guid>
      <link>http://www.traceofthought.net/2009/04/04/CodeProfilingTalkAndUtility.aspx</link>
      <pubDate>Sat, 04 Apr 2009 19:18:10 GMT</pubDate>
      <description>I had a chance to do a talk on profiling code for Microsoft's "&lt;a href="http://www.slickthought.net/post/2009/02/Minneapolis-and-Saint-Louis-Build-Your-Skills-Best-Practices-for-NET-Developers-Events.aspx"&gt;Build
Your Skills&lt;/a&gt;" event on March 24th in St. Louis (and March 31st in Minneapolis).&amp;nbsp;
I mentioned a utility I'd written for cleaning up performance session files that are
generated from URLs (so that only DLL/EXE remain.)&amp;nbsp; You can find that &lt;a href="misc/fixpsess.zip"&gt;here&lt;/a&gt;.&amp;nbsp;
In addition, you can find the slides &lt;a href="misc/SColestockCodeProfilingTalk.pdf"&gt;here&lt;/a&gt;.&amp;nbsp;
All sorts of fun details on profiling terminology, types of profiles, resigning assemblies
(or turning off assembly verification), etc.&amp;nbsp; I'm hoping to record a screen cast
of the talk soon...&lt;br&gt;
&lt;br&gt;
Fantastic turnout at both locations, and really great questions - thanks to those
who attended!&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=8e2240f3-c7b8-4aa7-94b6-06fac6080bac" /&gt;</description>
      <comments>http://www.traceofthought.net/CommentView,guid,8e2240f3-c7b8-4aa7-94b6-06fac6080bac.aspx</comments>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.traceofthought.net/Trackback.aspx?guid=415ff64b-769b-458f-ab1d-1c754bcab745</trackback:ping>
      <pingback:server>http://www.traceofthought.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.traceofthought.net/PermaLink,guid,415ff64b-769b-458f-ab1d-1c754bcab745.aspx</pingback:target>
      <dc:creator>Scott Colestock</dc:creator>
      <wfw:comment>http://www.traceofthought.net/CommentView,guid,415ff64b-769b-458f-ab1d-1c754bcab745.aspx</wfw:comment>
      <wfw:commentRss>http://www.traceofthought.net/SyndicationService.asmx/GetEntryCommentsRss?guid=415ff64b-769b-458f-ab1d-1c754bcab745</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I'll be giving a talk for Microsoft's "Build
Your Skills" event on March 24th in St. Louis (and March 31st in Minneapolis) on the
topic of code profiling.  We'll look at the profiling tools built into Visual
Studio Team System Developer, and a few others to boot.  You can get all the
details <a href="http://www.slickthought.net/post/2009/02/Minneapolis-and-Saint-Louis-Build-Your-Skills-Best-Practices-for-NET-Developers-Events.aspx">here</a>. 
There is a whole slate of great talks planned for the day, so register now if you're
in the area...<br /><p></p><img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=415ff64b-769b-458f-ab1d-1c754bcab745" /></body>
      <title>A talk on profiling...</title>
      <guid isPermaLink="false">http://www.traceofthought.net/PermaLink,guid,415ff64b-769b-458f-ab1d-1c754bcab745.aspx</guid>
      <link>http://www.traceofthought.net/2009/03/09/ATalkOnProfiling.aspx</link>
      <pubDate>Mon, 09 Mar 2009 13:33:47 GMT</pubDate>
      <description>I'll be giving a talk for Microsoft's "Build Your Skills" event on March 24th in St. Louis (and March 31st in Minneapolis) on the topic of code profiling.&amp;nbsp; We'll look at the profiling tools built into Visual Studio Team System Developer, and a few others to boot.&amp;nbsp; You can get all the details &lt;a href="http://www.slickthought.net/post/2009/02/Minneapolis-and-Saint-Louis-Build-Your-Skills-Best-Practices-for-NET-Developers-Events.aspx"&gt;here&lt;/a&gt;.&amp;nbsp;
There is a whole slate of great talks planned for the day, so register now if you're
in the area...&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=415ff64b-769b-458f-ab1d-1c754bcab745" /&gt;</description>
      <comments>http://www.traceofthought.net/CommentView,guid,415ff64b-769b-458f-ab1d-1c754bcab745.aspx</comments>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.traceofthought.net/Trackback.aspx?guid=2d5a8755-91ab-4d10-8fc7-463ab654ac69</trackback:ping>
      <pingback:server>http://www.traceofthought.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.traceofthought.net/PermaLink,guid,2d5a8755-91ab-4d10-8fc7-463ab654ac69.aspx</pingback:target>
      <dc:creator>Scott Colestock</dc:creator>
      <wfw:comment>http://www.traceofthought.net/CommentView,guid,2d5a8755-91ab-4d10-8fc7-463ab654ac69.aspx</wfw:comment>
      <wfw:commentRss>http://www.traceofthought.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2d5a8755-91ab-4d10-8fc7-463ab654ac69</wfw:commentRss>
      <title>New version of XmlPreprocess...</title>
      <guid isPermaLink="false">http://www.traceofthought.net/PermaLink,guid,2d5a8755-91ab-4d10-8fc7-463ab654ac69.aspx</guid>
      <link>http://www.traceofthought.net/2008/11/06/NewVersionOfXmlPreprocess.aspx</link>
      <pubDate>Thu, 06 Nov 2008 15:29:05 GMT</pubDate>
      <description>&lt;p&gt;
A tool that has been an important part of the &lt;a href="http://www.codeplex.com/biztalkdeployment"&gt;BizTalk
Deployment Framework&lt;/a&gt; has been updated by &lt;a href="http://weblogs.asp.net/lorenh/"&gt;Loren&lt;/a&gt;&amp;nbsp;&amp;ndash;
see the codeplex project &lt;a href="http://www.codeplex.com/xmlpreprocess"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
XmlPreProcess is a general purpose tool in its own right for managing configuration
files across multiple environments.&amp;nbsp; The tool has pulled in &lt;a href="http://www.codeplex.com/EnvSettingsManager"&gt;previously
separated functionality&lt;/a&gt; (the excellent stuff done by &lt;a href="http://blogs.digineer.com/blogs/tabraham/"&gt;Tom&lt;/a&gt;)
so that it can consume spreadsheets (that describe environment variations) directly,
rather than needing a separate process for that.&amp;nbsp; Very slick stuff !
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=2d5a8755-91ab-4d10-8fc7-463ab654ac69" /&gt;</description>
      <comments>http://www.traceofthought.net/CommentView,guid,2d5a8755-91ab-4d10-8fc7-463ab654ac69.aspx</comments>
      <category>Deployment Framework</category>
      <category>General</category>
    </item>
    <item>
      <trackback:ping>http://www.traceofthought.net/Trackback.aspx?guid=41ec11b3-9cbe-4dca-8762-074093c7a686</trackback:ping>
      <pingback:server>http://www.traceofthought.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.traceofthought.net/PermaLink,guid,41ec11b3-9cbe-4dca-8762-074093c7a686.aspx</pingback:target>
      <dc:creator>Scott Colestock</dc:creator>
      <wfw:comment>http://www.traceofthought.net/CommentView,guid,41ec11b3-9cbe-4dca-8762-074093c7a686.aspx</wfw:comment>
      <wfw:commentRss>http://www.traceofthought.net/SyndicationService.asmx/GetEntryCommentsRss?guid=41ec11b3-9cbe-4dca-8762-074093c7a686</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>Models as Text...</title>
      <guid isPermaLink="false">http://www.traceofthought.net/PermaLink,guid,41ec11b3-9cbe-4dca-8762-074093c7a686.aspx</guid>
      <link>http://www.traceofthought.net/2008/10/17/ModelsAsText.aspx</link>
      <pubDate>Fri, 17 Oct 2008 01:25:04 GMT</pubDate>
      <description>&lt;p&gt;
I&amp;rsquo;m not able to attend the PDC this year, but its been interesting to watch
the definition of Oslo take better shape after watching it for a long while.
&lt;/p&gt;
&lt;p&gt;
I was reading &lt;a href="http://www.masteringbiztalk.com/blogs/jon/PermaLink,guid,0e065d14-32d4-48da-b2a2-f265affb43ef.aspx"&gt;Jon
Flander&amp;rsquo;s post &lt;/a&gt;on the topic, where he reiterated the &amp;ldquo;Oslo as language,
model repository, and visual editor aka Quadrant&amp;rdquo; theme.&amp;nbsp; The language,
known as &amp;ldquo;M&amp;rdquo; &amp;ndash; draws this quote&amp;nbsp;from John: &amp;ldquo;visual models
are useful for a certain portion of the developer population, but for the most part
developers like to write code, which means text.&amp;rdquo;
&lt;/p&gt;
&lt;p&gt;
Text is good.&amp;nbsp; I can store text in a version control system, and branch it when
needed.&amp;nbsp; I can &lt;a href="http://www.araxis.com/merge/topic_threewayfilescreenshot.html"&gt;merge&lt;/a&gt; it
with well-known tools later on, and compare the &lt;a href="http://www.scootersoftware.com/moreinfo.php?zz=gallery"&gt;differences&lt;/a&gt; between
versions easily.&amp;nbsp; I can have multiple developers work on it at once with a sane
reconciliation process upon check-in.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Even visual models that have a textual representation &lt;a href="http://www.fileinfo.net/extension/odx"&gt;behind
the scenes&lt;/a&gt; struggle with these basics&amp;hellip;because the text is not first class
&amp;ndash; it&amp;nbsp;is (often) just a convenient serialization format that is sufficiently
opaque for the benefits of text to be lost.
&lt;/p&gt;
&lt;p&gt;
So I&amp;rsquo;m all for &amp;ldquo;M&amp;rdquo;.&amp;nbsp; It will be fun to watch the vision unfold
further.&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.traceofthought.net/aggbug.ashx?id=41ec11b3-9cbe-4dca-8762-074093c7a686" /&gt;</description>
      <comments>http://www.traceofthought.net/CommentView,guid,41ec11b3-9cbe-4dca-8762-074093c7a686.aspx</comments>
      <category>General</category>
    </item>
  </channel>
</rss>