<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>IdentityCrisis</title>
    <link>http://www.deploymentcentric.com/Blogs/joe/</link>
    <description>Code is a commodity.   Platform awareness ... Priceless</description>
    <copyright>Joseph E Shook</copyright>
    <lastBuildDate>Sat, 01 Sep 2007 22:27:11 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.8.5223.0</generator>
    <managingEditor>joeshook@deploymentcentric.com</managingEditor>
    <webMaster>joeshook@deploymentcentric.com</webMaster>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=61a845a5-d6b2-4b4f-be23-10cae29071dc</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,61a845a5-d6b2-4b4f-be23-10cae29071dc.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      We are working with some developers from India.  We have been forced to share
      some of our machines with the off shore developers while we figure out our distant
      relationship and connectivity issues when working on applications that have many end
      points within our network.  So the remote team will remote into certain desktops. 
      And yes we have enough licenses for the software.
   </p>
        <p>
      Recently we have started to work with TFS source control.  We moved away from
      Source Safe and CVS.  Well TFS has the concept of workspaces.  Workspaces
      map locations in the TFS source control to local folders.  As a user you may
      log into multiple machines and create workspaces on those machines.  If you look
      at the works spaces on a machine via the Workspaces drop down in Visual Studio you
      will see all the workspaces that you have created across the multiple machines.  
   </p>
        <p>
      So now say another user logs into your machine on the evening shift.  Why not
      safe a machine? Maybe not the best idea maybe so, but who cares.  Because this
      scenario can be just as valid if I decide to run-as another user in my Visual Studio
      environment to debug a security context specific bug.  Well if I need to
      get the latest code from TFS I will have to create a workspace and map to the same
      local file system as the workspace created under my everyday Windows account. 
      Well TFS will not allow this.  Two workspaces cannot be mapped to the same local
      path.
   </p>
        <p>
      You will have to delete the other workspace so you can map a new workspace for the
      currently logged in user.  I guess you could say that why are you mapping to
      the same place.  Why not isolate the code from each developer in there own profiles? 
      Yes we could, but up to this point we have just wanted consistency in directory structure
      origin.  I tried this it just moved our problem to the IIS Virtual
      directory mappings.  Yep, we are using IIS rather than the built in web server,
      reality first I say.  
   </p>
        <p>
      So assuming we are not going to change our ways, we will have to find the workspace
      that is using our local mapping and delete it.  To do this we need to use the
      tf.exe command line tool. 
   </p>
        <blockquote>
          <p>
       
   </p>
          <p>
      Here is the work around I have come up with while sharing a machine between users:
      (substituted users and machine names) 
   </p>
          <p>
      The bolded characters are my command line text. 
   </p>
          <p>
      First list the workspaces for a machine, in this case it is JoesComputer for all owners. 
      Notice the /owner:* wildcard search. 
   </p>
          <p>
      C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&gt;<b>tf workspaces /computer:JoesComputer
      /owner:* /server:http://TFSServer:8080</b></p>
          <p>
      Server: TFSServer 
   </p>
          <p>
      Workspace              
      Owner               
      Computer     Comment 
   </p>
          <p>
      ----------------------- -------------------- ------------ ----------------------------------------------------------------------- 
   </p>
          <p>
      HOBO_MyAccount          ShookJ              
      JoesComputer Temporary CruiseControl.NET Workspace 
   </p>
          <p>
      HOBO_NotificationServer ShookJ              
      JoesComputer Temporary CruiseControl.NET Workspace 
   </p>
          <p>
      HOBO_OnlineBillPayCsr   ShookJ              
      JoesComputer Temporary CruiseControl.NET Workspace 
   </p>
          <p>
      HOBO_ProfileManager     ShookJ              
      JoesComputer Temporary CruiseControl.NET Workspace 
   </p>
          <p>
      JoesComputer            ccnetServiceAccount
       JoesComputer 
   </p>
          <p>
      JoesComputer            BullPenUser            
      JoesComputer 
   </p>
          <p>
      Then delete each of the Workspaces that are on the machine mapped to you machine name.  
   </p>
          <p>
      C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&gt;<b>tf workspace /delete
      JoesComputer;ServDevelopmentBuild /server:http://TFSServer:8080</b></p>
          <p>
      A deleted workspace cannot be recovered. 
   </p>
          <p>
      Workspace 'JoesComputer;ServDevelopmentBuild' on server 'http://TFSServer:8080' has
      0 pending change(s). 
   </p>
          <p>
      Are you sure you want to delete the workspace? (Yes/No) y 
   </p>
          <p>
      C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&gt;<b>tf workspace /delete
      JoesComputer;BullPenUser /server:http://TFSServer:8080</b></p>
          <p>
      A deleted workspace cannot be recovered. 
   </p>
          <p>
      Workspace 'JoesComputer;BullPenUser' on server 'http://TFSServer:8080' has 3 pending
      change(s). 
   </p>
          <p>
      Are you sure you want to delete the workspace? (Yes/No) y 
   </p>
          <p>
      This worked for me because we happened to have a workspace name that was the same
      as the machine name.  Technically that is not the reason for the conflict mentioned
      in the email below.  No two workspaces mapped to the same computer can point
      to the same folder.  Great.  But we cannot share workspaces either across
      user profiles.  Seems pretty crummy.  
   </p>
          <p>
      There Is a more advanced search that will show you the mappings also so you know which
      workspaces to delete. 
   </p>
          <p>
            <b>tf workspaces /computer:JoesComputer /owner:* /server:http://TFSServer:8080 /format:detailed</b>
          </p>
          <p>
      Then just manually recreate your workspace.  We will just have to live with this
      while sharing machines.
   </p>
          <p>
      Has anyone our their created a script to make this more streamline?  Because
      I have admin rights on TFS this may not work for all users.  I will have to drill
      down on this.  But another path would be to isolate by user profile and thus
      have your own workspace.  Then create a script that will re-map your IIS virtual
      directories.  I have wanted to work with PowerShell and maybe this would be a
      good piece of automation to get me started.
   </p>
        </blockquote>
        <p>
       
   </p>
        <p>
      BTW  I have also faced issues with the new VSTS DB Pro tool in a shared workstation
      environment.  The temporary validation database is only owned by the person that
      created it.  But when another developer logs onto a colleagues machine and opens
      a solution with a database project in it you may receive errors.  If you
      try to build the project you will receive errors.  I found that the temporary
      database from the primary user is trying to be accessed by the visiting user.  The
      database file is secured to a single owner.  More on this later. 
   </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=61a845a5-d6b2-4b4f-be23-10cae29071dc" />
      </body>
      <title>Visual Studio perils in a shared Workstation Scenario (Bullpen)</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,61a845a5-d6b2-4b4f-be23-10cae29071dc.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,61a845a5-d6b2-4b4f-be23-10cae29071dc.aspx</link>
      <pubDate>Sat, 01 Sep 2007 22:27:11 GMT</pubDate>
      <description>&lt;p&gt;
   We are working with some developers from India.&amp;nbsp; We have been forced to share
   some of our machines with the off shore developers while we figure out our distant
   relationship and connectivity issues when working on applications that have many end
   points within our network.&amp;nbsp; So the remote team will remote into certain desktops.&amp;nbsp;
   And yes we have enough licenses for the software.
&lt;/p&gt;
&lt;p&gt;
   Recently we have started to work with TFS source control.&amp;nbsp; We moved away from
   Source Safe and CVS.&amp;nbsp; Well TFS has the concept of workspaces.&amp;nbsp; Workspaces
   map locations in the TFS source control to local folders.&amp;nbsp; As a user you may
   log into multiple machines and create workspaces on those machines.&amp;nbsp; If you look
   at the works spaces on a machine via the Workspaces drop down in Visual Studio you
   will see all the workspaces that you have created across the multiple machines.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
   So now say another user logs into your machine on the evening shift.&amp;nbsp; Why not
   safe a machine? Maybe not the best idea maybe so, but who cares.&amp;nbsp; Because this
   scenario can be just as valid if I decide to run-as another user in my Visual Studio
   environment to debug a security context specific&amp;nbsp;bug.&amp;nbsp; Well if I need to
   get the latest code from TFS I will have to create a workspace and map to the same
   local file system as the workspace created under my everyday Windows account.&amp;nbsp;
   Well TFS will not allow this.&amp;nbsp; Two workspaces cannot be mapped to the same local
   path.
&lt;/p&gt;
&lt;p&gt;
   You will have to delete the other workspace so you can map a new workspace for the
   currently logged in user.&amp;nbsp; I guess you could say that why are you mapping to
   the same place.&amp;nbsp; Why not isolate the code from each developer in there own profiles?&amp;nbsp;
   Yes we could, but up to this point we have just wanted consistency in directory structure
   origin.&amp;nbsp; I tried this&amp;nbsp;it just moved our problem to&amp;nbsp;the IIS Virtual
   directory mappings.&amp;nbsp; Yep, we are using IIS rather than the built in web server,
   reality first I say.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
   So assuming we are not going to change our ways, we will have to find the workspace
   that is using our local mapping and delete it.&amp;nbsp; To do this we need to use the
   tf.exe command line tool.&amp;nbsp;
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   Here is the work around I have come up with while sharing a machine between users:
   (substituted users and machine names) 
&lt;p&gt;
   The bolded characters are my command line text. 
&lt;p&gt;
   First list the workspaces for a machine, in this case it is JoesComputer for all owners.&amp;nbsp;
   Notice the /owner:* wildcard search. 
&lt;p&gt;
   C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&amp;gt;&lt;b&gt;tf workspaces /computer:JoesComputer
   /owner:* /server:http://TFSServer:8080&lt;/b&gt; 
&lt;p&gt;
   Server:&amp;nbsp;TFSServer 
&lt;p&gt;
   Workspace&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Owner&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Computer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Comment 
&lt;p&gt;
   ----------------------- -------------------- ------------ ----------------------------------------------------------------------- 
&lt;p&gt;
   HOBO_MyAccount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShookJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   JoesComputer Temporary CruiseControl.NET Workspace 
&lt;p&gt;
   HOBO_NotificationServer ShookJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   JoesComputer Temporary CruiseControl.NET Workspace 
&lt;p&gt;
   HOBO_OnlineBillPayCsr&amp;nbsp;&amp;nbsp; ShookJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   JoesComputer Temporary CruiseControl.NET Workspace 
&lt;p&gt;
   HOBO_ProfileManager&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ShookJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   JoesComputer Temporary CruiseControl.NET Workspace 
&lt;p&gt;
   JoesComputer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ccnetServiceAccount
   &amp;nbsp;JoesComputer 
&lt;p&gt;
   JoesComputer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BullPenUser&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   JoesComputer 
&lt;p&gt;
   Then delete each of the Workspaces that are on the machine mapped to you machine name.&amp;nbsp; 
&lt;p&gt;
   C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&amp;gt;&lt;b&gt;tf workspace /delete
   JoesComputer;ServDevelopmentBuild /server:http://TFSServer:8080&lt;/b&gt; 
&lt;p&gt;
   A deleted workspace cannot be recovered. 
&lt;p&gt;
   Workspace 'JoesComputer;ServDevelopmentBuild' on server 'http://TFSServer:8080' has
   0 pending change(s). 
&lt;p&gt;
   Are you sure you want to delete the workspace? (Yes/No) y 
&lt;p&gt;
   C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&amp;gt;&lt;b&gt;tf workspace /delete
   JoesComputer;BullPenUser /server:http://TFSServer:8080&lt;/b&gt; 
&lt;p&gt;
   A deleted workspace cannot be recovered. 
&lt;p&gt;
   Workspace 'JoesComputer;BullPenUser' on server 'http://TFSServer:8080' has 3 pending
   change(s). 
&lt;p&gt;
   Are you sure you want to delete the workspace? (Yes/No) y 
&lt;p&gt;
   This worked for me because we happened to have a workspace name that was the same
   as the machine name.&amp;nbsp; Technically that is not the reason for the conflict mentioned
   in the email below.&amp;nbsp; No two workspaces mapped to the same computer can point
   to the same folder.&amp;nbsp; Great.&amp;nbsp; But we cannot share workspaces either across
   user profiles.&amp;nbsp; Seems pretty crummy.&amp;nbsp; 
&lt;p&gt;
   There Is a more advanced search that will show you the mappings also so you know which
   workspaces to delete. 
&lt;p&gt;
   &lt;b&gt;tf workspaces /computer:JoesComputer /owner:* /server:http://TFSServer:8080 /format:detailed&lt;/b&gt; 
&lt;p&gt;
   Then just manually recreate your workspace.&amp;nbsp; We will just have to live with this
   while sharing machines.
&lt;/p&gt;
&lt;p&gt;
   Has anyone our their created a script to make this more streamline?&amp;nbsp; Because
   I have admin rights on TFS this may not work for all users.&amp;nbsp; I will have to drill
   down on this.&amp;nbsp; But another path would be to isolate by user profile and thus
   have your own workspace.&amp;nbsp; Then create a script that will re-map your IIS virtual
   directories.&amp;nbsp; I have wanted to work with PowerShell and maybe this would be a
   good piece of automation to get me started.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   BTW&amp;nbsp; I have also faced issues with the new VSTS DB Pro tool in a shared workstation
   environment.&amp;nbsp; The temporary validation database is only owned by the person that
   created it.&amp;nbsp; But when another developer logs onto a colleagues machine and opens
   a solution with a database project in it you may receive errors.&amp;nbsp;&amp;nbsp;If you
   try to build the project you will receive errors.&amp;nbsp; I found that the temporary
   database from the primary user is trying to be accessed by&amp;nbsp;the visiting user.&amp;nbsp;&amp;nbsp;The
   database file is secured to a single owner.&amp;nbsp; More on this later.&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=61a845a5-d6b2-4b4f-be23-10cae29071dc" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=9dfdd485-432e-4322-a9a0-00c0d2a2a3d1</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,9dfdd485-432e-4322-a9a0-00c0d2a2a3d1.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Find anyone's passport online:
   </p>
        <p>
          <a title="http://www.scrolllock.nl/passport/" href="http://www.scrolllock.nl/passport/">http://www.scrolllock.nl/passport/</a>
        </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=9dfdd485-432e-4322-a9a0-00c0d2a2a3d1" />
      </body>
      <title>Passport Search Tool</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,9dfdd485-432e-4322-a9a0-00c0d2a2a3d1.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,9dfdd485-432e-4322-a9a0-00c0d2a2a3d1.aspx</link>
      <pubDate>Wed, 18 Jul 2007 06:11:46 GMT</pubDate>
      <description>&lt;p&gt;
   Find anyone's passport online:
&lt;/p&gt;
&lt;p&gt;
   &lt;a title="http://www.scrolllock.nl/passport/" href="http://www.scrolllock.nl/passport/"&gt;http://www.scrolllock.nl/passport/&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=9dfdd485-432e-4322-a9a0-00c0d2a2a3d1" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=2a8e6c65-67e5-4601-9fef-e8fb832600e6</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,2a8e6c65-67e5-4601-9fef-e8fb832600e6.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I was just going through my bills.  I have a hospital bill here for $778.28. 
      That is after the insurance payment.  Gotta pay those yearly deductibles. 
      I am thinking if I am going to pay a bill that big I should be getting some air miles
      racked up on the Visa.  So I visit the URL on the bill, follow the instructions. 
      I put in the account number and the total bill.  I get back an option to pay
      off in full for, $700.45.  That is a 10% discount.  Typically I just pay
      online through my checking account.  I will have to remember this and so will
      you.
   </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=2a8e6c65-67e5-4601-9fef-e8fb832600e6" />
      </body>
      <title>Pay Online with www.providence.org/billpay and save money</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,2a8e6c65-67e5-4601-9fef-e8fb832600e6.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,2a8e6c65-67e5-4601-9fef-e8fb832600e6.aspx</link>
      <pubDate>Tue, 17 Jul 2007 03:38:05 GMT</pubDate>
      <description>&lt;p&gt;
   I was just going through my bills.&amp;nbsp; I have a hospital bill here for $778.28.&amp;nbsp;
   That is after the insurance payment.&amp;nbsp; Gotta pay those yearly deductibles.&amp;nbsp;
   I am thinking if I am going to pay a bill that big I should be getting some air miles
   racked up on the Visa.&amp;nbsp; So I visit the URL on the bill, follow the instructions.&amp;nbsp;
   I put in the account number and the total bill.&amp;nbsp; I get back an option to pay
   off in full for, $700.45.&amp;nbsp; That is a 10% discount.&amp;nbsp; Typically I just pay
   online through my checking account.&amp;nbsp; I will have to remember this and so will
   you.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=2a8e6c65-67e5-4601-9fef-e8fb832600e6" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=486d8e8e-0a5a-4453-adee-4142e8953abe</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,486d8e8e-0a5a-4453-adee-4142e8953abe.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Every thing is cool here.  Just taking a picture before we let this nice fish
      go.  The fish just keeps moving.
   </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5200021.JPG" border="0" />
        </p>
        <p>
      The the steelhead twists and arches back into my face.  It felt like I was hit
      with a hammer.  Notice the red spot.  Now hours later it realy hurts. 
      Thanks to my brother for getting the picture and laughing the whole time.
   </p>
        <p>
       
   </p>
        <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5200022.JPG" border="0" />
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=486d8e8e-0a5a-4453-adee-4142e8953abe" />
      </body>
      <title>Steelhead shiner</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,486d8e8e-0a5a-4453-adee-4142e8953abe.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,486d8e8e-0a5a-4453-adee-4142e8953abe.aspx</link>
      <pubDate>Mon, 21 May 2007 05:16:52 GMT</pubDate>
      <description>&lt;p&gt;
   Every thing is cool here.&amp;nbsp; Just taking a picture before we let this nice fish
   go.&amp;nbsp; The fish just keeps moving.
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5200021.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   The the steelhead twists and arches back into my face.&amp;nbsp; It felt like I was hit
   with a hammer.&amp;nbsp; Notice the red spot.&amp;nbsp; Now hours later it realy hurts.&amp;nbsp;
   Thanks to my brother for getting the picture and laughing the whole time.
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5200022.JPG" border=0&gt;&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=486d8e8e-0a5a-4453-adee-4142e8953abe" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=d6b83cbc-b7c9-4a49-8279-86e9e663acd3</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,d6b83cbc-b7c9-4a49-8279-86e9e663acd3.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Hey Mr Schwary, is this one big enough for you.
   </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1436.JPG" border="0" />
        </p>
        <p>
       
   </p>
        <font size="2">
          <p>
      My brother and I give you all fly fishing lessons. 
   </p>
        </font>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1514.JPG" border="0" />
        </p>
        <font size="2">
          <p>
      Ok, my brother is the real master. For every 1 steal head I catch he catches 20. No
      lie.  This is him fishing with style.  If you ever fished with him, you
      would say he is the Michael Jordan of fishing.  Check out his pictures and article
      in Salmon Trout Steelheader magazine in December/January.
   </p>
        </font>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1534.JPG" border="0" />
        </p>
        <p>
      Here are some nice arials.
   </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1004.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1008.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1014.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1015.JPG" border="0" />
        </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=d6b83cbc-b7c9-4a49-8279-86e9e663acd3" />
      </body>
      <title>More fishing shots</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,d6b83cbc-b7c9-4a49-8279-86e9e663acd3.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,d6b83cbc-b7c9-4a49-8279-86e9e663acd3.aspx</link>
      <pubDate>Mon, 21 May 2007 02:00:21 GMT</pubDate>
      <description>&lt;p&gt;
   Hey Mr Schwary, is this one big enough for you.
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1436.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
   My brother and I give you all fly fishing lessons. 
&lt;/p&gt;
&lt;/font&gt; 
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1514.JPG" border=0&gt;
&lt;/p&gt;
&lt;font size=2&gt; 
&lt;p&gt;
   Ok, my brother is the real master. For every 1 steal head I catch he catches 20. No
   lie.&amp;nbsp; This is him fishing with style.&amp;nbsp; If you ever fished with him, you
   would say he is the Michael Jordan of fishing.&amp;nbsp; Check out his pictures and article
   in Salmon Trout Steelheader magazine in December/January.
&lt;/p&gt;
&lt;/font&gt; 
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1534.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Here are some nice arials.
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1004.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1008.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1014.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/IMG_1015.JPG" border=0&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=d6b83cbc-b7c9-4a49-8279-86e9e663acd3" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=2a31dd57-dc21-41b6-bbef-877a74b1eeae</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,2a31dd57-dc21-41b6-bbef-877a74b1eeae.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Nothing technical here to see this week.  :) not that I have posted much in the
      recent past.  My brother is a river guide on the Situk river in Yakutat Alaska. 
      This weekend I am visiting him while he has some time off.  
   </p>
        <p>
      Here are some pictures of me with some real nice chromies.   This is with
      3 hours of sleep and 2 hours after getting off the plane.
   </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170068.JPG" border="0" />
        </p>
        <p>
       
   </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170075.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170077.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170079.JPG" border="0" />
        </p>
        <p>
          <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170080.JPG" border="0" />
        </p>
        <p>
      Tomorrow I will have a picture from a magazine article my brother wrote for Salmon
      Trout Stealheader magazine.  The Nick Ammato, the editor says it is one of the
      best fish jumping ever caught on film.  It also is presented on the wall just
      as you enter the side door to the Yakutat Lodge.
   </p>
        <p>
      Oh and here is a bear we saw.  He was pretty far away.
   </p>
        <img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170087.jpg" border="0" />
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=2a31dd57-dc21-41b6-bbef-877a74b1eeae" />
      </body>
      <title>Fishing in Yakutat Alask with my Brother</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,2a31dd57-dc21-41b6-bbef-877a74b1eeae.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,2a31dd57-dc21-41b6-bbef-877a74b1eeae.aspx</link>
      <pubDate>Fri, 18 May 2007 07:06:28 GMT</pubDate>
      <description>&lt;p&gt;
   Nothing technical here to see this week.&amp;nbsp; :) not that I have posted much in the
   recent past.&amp;nbsp; My brother is a river guide on the Situk river in Yakutat Alaska.&amp;nbsp;
   This weekend I am visiting him while he has some time off.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
   Here are some pictures of me with some real nice chromies.&amp;nbsp;&amp;nbsp; This is with
   3 hours of sleep and&amp;nbsp;2 hours after getting off the plane.
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170068.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170075.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170077.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170079.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170080.JPG" border=0&gt;
&lt;/p&gt;
&lt;p&gt;
   Tomorrow I will have a picture from a magazine article my brother wrote for Salmon
   Trout Stealheader magazine.&amp;nbsp; The Nick Ammato, the editor says it is one of the
   best fish jumping ever caught on film.&amp;nbsp; It also is presented on the wall just
   as you enter the side door to the Yakutat Lodge.
&lt;/p&gt;
&lt;p&gt;
   Oh and here is a bear we saw.&amp;nbsp; He was pretty far away.
&lt;/p&gt;
&lt;img src="http://www.deploymentcentric.com/Blogs/joe/content/binary/P5170087.jpg" border=0&gt;&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=2a31dd57-dc21-41b6-bbef-877a74b1eeae" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=65260b8b-9fe6-49c4-9fed-f4c053f665b8</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,65260b8b-9fe6-49c4-9fed-f4c053f665b8.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title>Hitachi Travelstar 7K200 Introduced</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,65260b8b-9fe6-49c4-9fed-f4c053f665b8.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,65260b8b-9fe6-49c4-9fed-f4c053f665b8.aspx</link>
      <pubDate>Thu, 17 May 2007 04:05:24 GMT</pubDate>
      <description>&lt;p&gt;
   From &lt;a href="http://laptoping.com/hitachi-travelstar-7k200.html"&gt;http://laptoping.com/hitachi-travelstar-7k200.html&lt;/a&gt;
&lt;/p&gt;
&lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt; 
&lt;p&gt;
   &lt;a href="http://laptoping.com/wp-content/hitachi_travelstar_7K200.jpg" rel="lightbox"&gt;&lt;em&gt;&lt;img title="Hitachi Travelstar 7K200" height="140" alt="Hitachi Travelstar 7K200" src="http://laptoping.com/wp-content/_hitachi_travelstar_7K200.jpg" width="124" /&gt;&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;strong&gt;Hitachi&lt;/strong&gt; has
   announced volume shipment of the &lt;strong&gt;Travelstar 7K200&lt;/strong&gt;, &amp;ldquo;industry&amp;rsquo;s
   highest-capacity, highest-performing notebook hard drive with new optional data encryption
   technology&amp;rdquo;. The 2.5-inch Hitachi Travelstar 7K200 spins at 7200rpm. It comes
   with 80GB, 100GB, 120GB, 160GB, or 200GB storage capacity and 16MB cache buffer memory,
   and uses SATA 3GB/s interface.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;em&gt;&amp;ldquo;With double the capacity and a 22 percent performance improvement over
   its predecessor, the 200-gigabyte (GB), 7200 RPM Travelstar 7K200 reigns supreme as
   the leader in this elite notebook hard drive segment. Now, with optional hard-drive
   level &amp;ldquo;Bulk Data Encryption&amp;rdquo; technology from Hitachi, the Travelstar 7K200
   offers even greater cachet to notebook users by helping to guard against data loss
   and piracy,&amp;rdquo; the Company&amp;rsquo;s press release says.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;a id="more-832"&gt;&lt;/a&gt;&lt;em&gt;Despite the higher motor spin speed, the 7200rpm Travelstar
   7K200 offers comparable power consumption, heat emission and acoustics to its 5400
   RPM counterparts, Hitachi claims.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;em&gt;Hitachi will also offer the Travelstar E7K200, an &amp;ldquo;enhanced-availability
   version&amp;rdquo; of the 7K200. The Travelstar E7K200 is designed for applications that
   require 24&amp;times;7 data access.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;em&gt;Hitachi Travelstar 7K200 will be available in retail this summer at a suggested
   retail price of $249. Dell and Alienware already offer this hard drive on all Dell
   XPS notebooks and on all Alienware notebooks.&lt;/em&gt;
&lt;/p&gt;
&lt;/blockquote&gt;&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=65260b8b-9fe6-49c4-9fed-f4c053f665b8" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=b91cd4bb-031d-44b5-803d-a3f9f7681e22</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,b91cd4bb-031d-44b5-803d-a3f9f7681e22.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Please go and read this: 
   </p>
        <p>
          <a title="http://www.interact-sw.co.uk/iangblog/2007/05/09/uacproblem" href="http://www.interact-sw.co.uk/iangblog/2007/05/09/uacproblem">http://www.interact-sw.co.uk/iangblog/2007/05/09/uacproblem</a>
        </p>
        <p>
       
   </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=b91cd4bb-031d-44b5-803d-a3f9f7681e22" />
      </body>
      <title>UAC: Don't be Part of the Problem</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,b91cd4bb-031d-44b5-803d-a3f9f7681e22.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,b91cd4bb-031d-44b5-803d-a3f9f7681e22.aspx</link>
      <pubDate>Thu, 10 May 2007 16:44:12 GMT</pubDate>
      <description>&lt;p&gt;
   Please go and read this: 
&lt;/p&gt;
&lt;p&gt;
   &lt;a title="http://www.interact-sw.co.uk/iangblog/2007/05/09/uacproblem" href="http://www.interact-sw.co.uk/iangblog/2007/05/09/uacproblem"&gt;http://www.interact-sw.co.uk/iangblog/2007/05/09/uacproblem&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=b91cd4bb-031d-44b5-803d-a3f9f7681e22" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=e11853c0-738f-44c5-bb62-024a27879d00</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,e11853c0-738f-44c5-bb62-024a27879d00.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I have been spelling Identity wrong for a long time in the title of this Blog. 
      Not one person mentioned it.  Maybe everyone thought I meant it that way?
   </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=e11853c0-738f-44c5-bb62-024a27879d00" />
      </body>
      <title>IdendityCrisis VS IdentityCrisis</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,e11853c0-738f-44c5-bb62-024a27879d00.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,e11853c0-738f-44c5-bb62-024a27879d00.aspx</link>
      <pubDate>Wed, 07 Jun 2006 17:13:21 GMT</pubDate>
      <description>&lt;p&gt;
   I have been spelling Identity wrong for a long time in the title of this Blog.&amp;nbsp;
   Not one person mentioned it.&amp;nbsp; Maybe everyone thought I meant it that way?
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=e11853c0-738f-44c5-bb62-024a27879d00" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=517d8326-d4ca-40bb-860c-14c754eb44d6</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,517d8326-d4ca-40bb-860c-14c754eb44d6.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title> The .NET Developer's Guide to Directory Services Programming</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,517d8326-d4ca-40bb-860c-14c754eb44d6.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,517d8326-d4ca-40bb-860c-14c754eb44d6.aspx</link>
      <pubDate>Fri, 02 Jun 2006 19:31:32 GMT</pubDate>
      <description>&lt;p&gt;
   It looks like Joe Kaplan and Ryan Dunn have completely finished.&amp;nbsp; Their book, &lt;a href="http://www.amazon.com/exec/obidos/redirect?link_code=ur2&amp;amp;tag=deploymentcen-20&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;path=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F0321350170%2Fsr%3D8-3%2Fqid%3D1149276067%2Fref%3Dpd_bbs_3%3F%255Fencoding%3DUTF8"&gt;The
   .NET Developer's Guide to Directory Services Programming&lt;/a&gt;&lt;img style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN: 0px; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=deploymentcen-20&amp;amp;l=ur2&amp;amp;o=1" width="1" border="0" /&gt;&amp;nbsp;is
   for sale at Amazon.
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;&lt;img alt="" src="http://images.amazon.com/images/P/0321350170.01._AA240_SCLZZZZZZZ_V54564320_.jpg" border="0" /&gt;
&lt;/p&gt;
&lt;p&gt;
   It will no doubt be one of those books that leaves on my shelf until I leave the software
   industry.&amp;nbsp; It will be a great companion to Keith Brown&amp;rsquo;s &lt;a href="http://www.amazon.com/exec/obidos/redirect?link_code=ur2&amp;amp;tag=deploymentcen-20&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;path=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F0321228359%2Fqid%3D1149276449%2Fsr%3D1-1%2Fref%3Dsr_1_1%3Fs%3Dbooks%26v%3Dglance%26n%3D283155"&gt;The
   .NET Developer's Guide to Windows Security &lt;/a&gt;&lt;img style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN: 0px; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=deploymentcen-20&amp;amp;l=ur2&amp;amp;o=1" width="1" border="0" /&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;img alt="" src="http://images.amazon.com/images/P/0321228359.01._AA240_SCLZZZZZZZ_V50578529_.jpg" border="0" /&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=517d8326-d4ca-40bb-860c-14c754eb44d6" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=f17b0e3c-0941-4ff5-a5eb-809c6bcdc662</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f17b0e3c-0941-4ff5-a5eb-809c6bcdc662.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title>SelfSSL or MakeCert (And FireFox -8183 error code)</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f17b0e3c-0941-4ff5-a5eb-809c6bcdc662.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f17b0e3c-0941-4ff5-a5eb-809c6bcdc662.aspx</link>
      <pubDate>Fri, 26 May 2006 23:10:29 GMT</pubDate>
      <description>&lt;p&gt;
   I have used MakeCert a while back to issue my dev box a certificate.&amp;nbsp; Then I
   could browse with &lt;a href="https://localhost/"&gt;https://localhost&lt;/a&gt;&amp;hellip;. no problem.&amp;nbsp;
   But I was only testing with IE.&amp;nbsp; I tried it with FireFox and received a dialog
   box with the error: &amp;ldquo;Error establishing an encrypted connection to localhost.
   Error Code: -8183&amp;rdquo;.&amp;nbsp; If I made the request from a different machine to
   my development box SSL communications worked fine.&amp;nbsp; And I could initiate SSL
   traffic from my dev box to external SSL locations.&amp;nbsp; I search and found many issues
   but those issues never quoted the -8183 code but some codes very close.&amp;nbsp; But
   the underlying theme was a bad certificate.&amp;nbsp; So I started searching my emails
   and file system with X1 and found &lt;a href="http://blog.coryisakson.com/PermaLink,guid,67d7542d-5a28-4de1-8be3-24903d6eb5c1.aspx"&gt;Cory&amp;rsquo;s
   post&lt;/a&gt; about using MakeCert.&amp;nbsp;&amp;nbsp;In the past I have followed his lead but
   It always took a while.&amp;nbsp; Actually I remember finding MakeCert.exe to be a problem.&amp;nbsp;
   This time I decided to use the SelfSSL.exe tool that is located in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS
   6.0 Resource Kit&lt;/a&gt;.&amp;nbsp;&amp;nbsp;A quick look through X1 revealed&amp;nbsp;I&amp;nbsp;am storing
   the installation of the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS
   6.0 Resource Kit&lt;/a&gt;.&amp;nbsp; So I installed it.&amp;nbsp; First I removed my current cert
   from IIS.&amp;nbsp; Then I ran the following: &amp;ldquo;SelfSSL.exe /T /N: CN=localhost&amp;nbsp;/V:700&amp;rdquo;.&amp;nbsp;
   That is it.&amp;nbsp; /T adds the self-signed certificate to the &amp;ldquo;Trusted Certificates&amp;rdquo;
   list.&amp;nbsp; /V sets how long he cert is good for.&amp;nbsp; Default is 7 days.&amp;nbsp; I
   don&amp;rsquo;t want to worry about doing this again until I rebuild the machine.&amp;nbsp;
   Check out IIS and you will see the cert and 443 port enabled. /N to force the common
   name to localhost.&amp;nbsp; At least then in development you will not get the Security
   Alert dialog, claiming the name on the security certificate is invalid or does not
   match the name of the site.
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   That was easy.
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Get &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS
      6.0 Resource Kit&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;
      Run SelfSSL.exe /T /N:CN=localhost&amp;nbsp;/V:700 .&amp;nbsp;&amp;nbsp; Use the shortcut from
      the Start | All Programs Menus&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   BTW, this can be ran over and over again without having to manually remove the existing
   cert from IIS.&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=f17b0e3c-0941-4ff5-a5eb-809c6bcdc662" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=bbfeffb0-aeb7-4bbc-869d-5a90e7feb3f4</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,bbfeffb0-aeb7-4bbc-869d-5a90e7feb3f4.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title>SelfSSL or MakeCert (And FireFox -8183 error code)</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,bbfeffb0-aeb7-4bbc-869d-5a90e7feb3f4.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,bbfeffb0-aeb7-4bbc-869d-5a90e7feb3f4.aspx</link>
      <pubDate>Fri, 26 May 2006 21:10:25 GMT</pubDate>
      <description>&lt;p&gt;
   I have used MakeCert a while back to issue my dev box a certificate.&amp;nbsp; Then I
   could browse with &lt;a href="https://localhost/"&gt;https://localhost&lt;/a&gt;&amp;hellip;. no problem.&amp;nbsp;
   But I was only testing with IE.&amp;nbsp; I tried it with FireFox and received a dialog
   box with the error: &amp;ldquo;Error establishing an encrypted connection to localhost.
   Error Code: -8183&amp;rdquo;.&amp;nbsp; If I made the request from a different machine to
   my development box SSL communications worked fine.&amp;nbsp; And I could initiate SSL
   traffic from my dev box to external SSL locations.&amp;nbsp; I search and found many issues
   but those issues never quoted the -8183 code but some codes very close.&amp;nbsp; But
   the underlying theme was a bad certificate.&amp;nbsp; So I started searching my emails
   and file system with X1 and found &lt;a href="http://blog.coryisakson.com/PermaLink,guid,67d7542d-5a28-4de1-8be3-24903d6eb5c1.aspx"&gt;Cory&amp;rsquo;s
   post&lt;/a&gt; about using MakeCert.&amp;nbsp;&amp;nbsp;In the past I have followed his lead but
   It always took a while.&amp;nbsp; Actually I remember finding MakeCert.exe to be a problem.&amp;nbsp;
   This time I decided to use the SelfSSL.exe tool that is located in the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS
   6.0 Resource Kit&lt;/a&gt;.&amp;nbsp;&amp;nbsp;A quick look through X1 revealed&amp;nbsp;I&amp;nbsp;am storing
   the installation of the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS
   6.0 Resource Kit&lt;/a&gt;.&amp;nbsp; So I installed it.&amp;nbsp; First I removed my current cert
   from IIS.&amp;nbsp; Then I ran the following: &amp;ldquo;SelfSSL.exe /T /V:700&amp;rdquo;.&amp;nbsp;
   That is it.&amp;nbsp; /T adds the self-signed certificate to the &amp;ldquo;Trusted Certificates&amp;rdquo;
   list.&amp;nbsp; /V sets how long he cert is good for.&amp;nbsp; Default is 7 days.&amp;nbsp; I
   don&amp;rsquo;t want to worry about doing this again until I rebuild the machine.&amp;nbsp;
   Check out IIS and you will see the cert and 443 port enabled.
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   That was easy.
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Get &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&amp;amp;displaylang=en"&gt;IIS
      6.0 Resource Kit&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;
      Run SelfSSL.exe /T /V:700 .&amp;nbsp;&amp;nbsp; Use the shortcut from the Start | All Programs
      Menus&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=bbfeffb0-aeb7-4bbc-869d-5a90e7feb3f4" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=8fda4a7d-49bf-420e-8e9a-86282a8809c4</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,8fda4a7d-49bf-420e-8e9a-86282a8809c4.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title>SelfSSL or MakeCert (And FireFox -8183 error code)</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,8fda4a7d-49bf-420e-8e9a-86282a8809c4.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,8fda4a7d-49bf-420e-8e9a-86282a8809c4.aspx</link>
      <pubDate>Thu, 25 May 2006 01:38:41 GMT</pubDate>
      <description>&lt;p&gt;
   I have used MakeCert a while back to issue my dev box a certificate.&amp;nbsp; Then I
   could browse with &lt;a href="https://localhost/"&gt;https://localhost&lt;/a&gt;&amp;hellip;. no problem.&amp;nbsp;
   But I was only testing with IE.&amp;nbsp; I tried it with FireFox and received a dialog
   box with the error: &amp;ldquo;Error establishing an encrypted connection to localhost.
   Error Code: -8183&amp;rdquo;.&amp;nbsp; If I made the request from a different machine to
   my development box SSL communications worked fine.&amp;nbsp; And I could initiate SSL
   traffic from my dev box to external SSL locations.&amp;nbsp; I search and found many issues
   but those issues never quoted the -8183 code but some codes very close.&amp;nbsp; But
   the underlying theme was a bad certificate.&amp;nbsp; So I started searching my emails
   and file system with X1 and found &lt;a href="http://blog.coryisakson.com/PermaLink,guid,67d7542d-5a28-4de1-8be3-24903d6eb5c1.aspx"&gt;Cory&amp;rsquo;s
   post&lt;/a&gt; about using MakeCert.&amp;nbsp;&amp;nbsp;In the past I have followed his lead but
   It always took a while.&amp;nbsp; Actually I remember finding MakeCert.exe to be a problem.&amp;nbsp;
   This time I decided to use the SelfSSL.exe tool that is located in the &lt;a href="http://www.microsoft.com/windowsserver2003/iis/diagnostictools/default.mspx"&gt;IIS
   6.0 Resource Kit&lt;/a&gt;.&amp;nbsp;&amp;nbsp;A quick look through X1 revealed&amp;nbsp;I&amp;nbsp;am storing
   the installation of the &lt;a href="http://www.microsoft.com/windowsserver2003/iis/diagnostictools/default.mspx"&gt;IIS
   6.0 Resource Kit&lt;/a&gt;.&amp;nbsp; So I installed it.&amp;nbsp; First I removed my current cert
   from IIS.&amp;nbsp; Then I ran the following: &amp;ldquo;SelfSSL.exe /T /V:700&amp;rdquo;.&amp;nbsp;
   That is it.&amp;nbsp; /T adds the self-signed certificate to the &amp;ldquo;Trusted Certificates&amp;rdquo;
   list.&amp;nbsp; /V sets how long he cert is good for.&amp;nbsp; Default is 7 days.&amp;nbsp; I
   don&amp;rsquo;t want to worry about doing this again until I rebuild the machine.&amp;nbsp;
   Check out IIS and you will see the cert and 443 port enabled.
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   That was easy.
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      Get &lt;a href="http://www.microsoft.com/windowsserver2003/iis/diagnostictools/default.mspx"&gt;IIS
      6.0 Resource Kit&lt;/a&gt;.&lt;/li&gt;
   &lt;li&gt;
      Run SelfSSL.exe /T /V:700 .&amp;nbsp;&amp;nbsp; Use the shortcut from the Start | All Programs
      Menus&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=8fda4a7d-49bf-420e-8e9a-86282a8809c4" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=28ba2f26-2fd8-49c5-bbcb-91c9e41ec7f5</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,28ba2f26-2fd8-49c5-bbcb-91c9e41ec7f5.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title>Unit Test Const keys against Resouce Files</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,28ba2f26-2fd8-49c5-bbcb-91c9e41ec7f5.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,28ba2f26-2fd8-49c5-bbcb-91c9e41ec7f5.aspx</link>
      <pubDate>Wed, 01 Feb 2006 05:33:53 GMT</pubDate>
      <description>&lt;p&gt;
   I have a resource file (.resx) with some keys and values.&amp;nbsp; I created a Resource
   class to wrap access to the System.Resources.ResourceManager.&amp;nbsp; In the Resource
   class I created a class filled with just constants so I would have a nice intellisence
   experience while developing.&amp;nbsp; Although this helps eliminate errors when trying
   to key into the resource file they don&amp;rsquo;t go away, because I either make mistakes
   while typing or keep changing my mind and forgetting to change the key text in the
   three or more places it must change.&amp;nbsp; So I wrote a nice unit test that tests
   all constants and verifies I am not using a message value more than once.&amp;nbsp; I
   instantly found a couple mistakes.&amp;nbsp; Now I need a code gen to reverse the .resx
   file to the Resource.Message class.&amp;nbsp; (Message might be a bad name. hmm&amp;hellip;)&amp;nbsp;
   Back to work.
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;Sample Resource example:
&lt;/p&gt;
&lt;p&gt;
   public Resource { 
   &lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; public class Messages {&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public const string RES_Validate_UserNameRequired
   = "RES_Validate_UserNameRequired";&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public const string RES_Validate_UserNameFormat
   = "RES_Validate_UserNameFormat";&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public const string RES_Validate_UserNameExists
   = "RES_Validate_UserNameExists";&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; } 
   &lt;br /&gt;
   &amp;hellip;&lt;br /&gt;
   } 
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   Unit test:
&lt;/p&gt;
&lt;p&gt;
   [Test]&lt;br /&gt;
   public void MessageResourceTests() {&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; string message;&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; string key;&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; Hashtable messageTable = new Hashtable(CaseInsensitiveHashCodeProvider.Default,
   CaseInsensitiveComparer.Default);
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; FieldInfo[] fields = typeof(Resource.Messages).GetFields();&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; 
   &lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; foreach(FieldInfo field in fields){&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (field.IsLiteral) {&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; key = field.GetValue(null).ToString();&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message = Resource.MessageResourceManager.FormatMessage(key);&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.IsNotEmpty(message);&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert.IsFalse(messageTable.ContainsValue(message),
   "Resource message duplicate: [{0}]{1}",key,message);&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; messageTable[key]
   = message;&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
   }
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=28ba2f26-2fd8-49c5-bbcb-91c9e41ec7f5" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=6864a388-12ba-4736-be6e-c88ea2e47f7a</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,6864a388-12ba-4736-be6e-c88ea2e47f7a.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I just installed the updated TestDriven.Net and the Ncover 1.5.2 Beta.  In seconds
      I was using a explorer interface that just walked me right to the code that was not
      covered.  I did not need to read instructions, nothing.  It just made sense. 
      This is zero friction for sure.
   </p>
        <p>
      This is the best place to go to link you to the piece needed:
   </p>
        <p>
          <a href="http://weblogs.asp.net/nunitaddin/archive/2006/01/30/436896.aspx">http://weblogs.asp.net/nunitaddin/archive/2006/01/30/436896.aspx</a>
        </p>
        <p>
      You need:
   </p>
        <ul>
          <li>
         TestDriven.Net</li>
          <li>
         NCover 1.5.1 Beta (or later)</li>
          <li>
         .NET 2.0 framework.</li>
        </ul>
        <p>
      It runs on any version of Visual Studio, any!
   </p>
        <p>
       
   </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=6864a388-12ba-4736-be6e-c88ea2e47f7a" />
      </body>
      <title>TestDriven.Net with code coverage</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,6864a388-12ba-4736-be6e-c88ea2e47f7a.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,6864a388-12ba-4736-be6e-c88ea2e47f7a.aspx</link>
      <pubDate>Tue, 31 Jan 2006 19:33:02 GMT</pubDate>
      <description>&lt;p&gt;
   I just installed the updated TestDriven.Net and the Ncover 1.5.2 Beta.&amp;nbsp; In seconds
   I was using a explorer interface that just walked me right to the code that was not
   covered.&amp;nbsp; I did not need to read instructions, nothing.&amp;nbsp; It just made sense.&amp;nbsp;
   This is zero friction for sure.
&lt;/p&gt;
&lt;p&gt;
   This is the best place to go to link you to the piece needed:
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://weblogs.asp.net/nunitaddin/archive/2006/01/30/436896.aspx"&gt;http://weblogs.asp.net/nunitaddin/archive/2006/01/30/436896.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   You need:
&lt;/p&gt;
&lt;ul&gt;
   &lt;li&gt;
      TestDriven.Net&lt;/li&gt;
   &lt;li&gt;
      NCover 1.5.1 Beta (or later)&lt;/li&gt;
   &lt;li&gt;
      .NET 2.0 framework.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
   It runs on any version of Visual Studio, any!
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=6864a388-12ba-4736-be6e-c88ea2e47f7a" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=f386d0bb-bb32-4382-a40a-8edf8c00caab</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f386d0bb-bb32-4382-a40a-8edf8c00caab.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title>Apply the Principle of Least Privilege to User Accounts on Windows XP.</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f386d0bb-bb32-4382-a40a-8edf8c00caab.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f386d0bb-bb32-4382-a40a-8edf8c00caab.aspx</link>
      <pubDate>Fri, 27 Jan 2006 16:27:33 GMT</pubDate>
      <description>&lt;p&gt;
   New white paper from Microsoft:
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/luawinxp.mspx"&gt;http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/luawinxp.mspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;It isn&amp;rsquo;t huge but there is a lot in there.&amp;nbsp; Including a&amp;nbsp;new
   tools like &lt;a href="http://blogs.msdn.com/aaron_margosis/archive/2004/07/24/193721.aspx"&gt;MakeMeAdmin &lt;/a&gt;and&amp;nbsp;&lt;a href="http://blogs.msdn.com/aaron_margosis/search.aspx?q=privbar&amp;amp;p=1"&gt;PrivBar &lt;/a&gt;that
   I have heard about through &lt;a href="Aaron Margosis"&gt;Aaron Margosis &lt;/a&gt;WebLog.
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=f386d0bb-bb32-4382-a40a-8edf8c00caab" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=78e75624-c193-4f4a-a929-e8856e83237f</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,78e75624-c193-4f4a-a929-e8856e83237f.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <title>Funny funny</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,78e75624-c193-4f4a-a929-e8856e83237f.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,78e75624-c193-4f4a-a929-e8856e83237f.aspx</link>
      <pubDate>Thu, 26 Jan 2006 06:51:02 GMT</pubDate>
      <description>&lt;p&gt;
   This is sooooo&amp;hellip; funny, or should I say true to life.
&lt;/p&gt;
&lt;p&gt;
   My wife said somthing like &amp;ldquo;You save that!&amp;nbsp; I am playing it at our 20th
   anniversary.&amp;nbsp; That is my life!&amp;rdquo;
&lt;/p&gt;
&lt;p&gt;
   &lt;a href="http://video.google.com/videoplay?docid=1329362959167995041&amp;amp;q=tripod"&gt;http://video.google.com/videoplay?docid=1329362959167995041&amp;amp;q=tripod&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
   &amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=78e75624-c193-4f4a-a929-e8856e83237f" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=abbc1f6b-0eb9-4753-85e3-49fd91c6a609</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,abbc1f6b-0eb9-4753-85e3-49fd91c6a609.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I have installed an interesting application - <a href="http://blogjet.com/">BlogJet</a>.
      It's a cool Windows client for my blog tool (as well as for other tools). Get your
      copy here: <a href="http://blogjet.com/">http://blogjet.com</a></p>
        <p>
          <em>"Computers are incredibly fast, accurate and stupid; humans are incredibly slow,
      inaccurate and brilliant; together they are powerful beyond imagination." -- Albert
      Einstein</em>
        </p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=abbc1f6b-0eb9-4753-85e3-49fd91c6a609" />
      </body>
      <title>Testing BlogJet</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,abbc1f6b-0eb9-4753-85e3-49fd91c6a609.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,abbc1f6b-0eb9-4753-85e3-49fd91c6a609.aspx</link>
      <pubDate>Thu, 26 Jan 2006 06:22:36 GMT</pubDate>
      <description>&lt;p&gt;
   I have installed an interesting application - &lt;a href="http://blogjet.com/"&gt;BlogJet&lt;/a&gt;.
   It's a cool Windows client for my blog tool (as well as for other tools). Get your
   copy here: &lt;a href="http://blogjet.com/"&gt;http://blogjet.com&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
   &lt;em&gt;"Computers are incredibly fast, accurate and stupid; humans are incredibly slow,
   inaccurate and brilliant; together they are powerful beyond imagination." -- Albert
   Einstein&lt;/em&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=abbc1f6b-0eb9-4753-85e3-49fd91c6a609" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=78e50c9e-b873-46a1-b435-c64765135716</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,78e50c9e-b873-46a1-b435-c64765135716.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Recently, ok more than 7 or 8 months ago.  It has been a
      while since I last blogged.  I was working on a intranet web application and
      faced with testing role based business rules.  I needed to impersonate users
      temporarily.  I needed both positive and negative tests.  I needed to package
      the impersonation code so all developer on our team could easily reuse.  I needed
      to do it over night so team members that needed it could start right away.  I
      already implemented some code in our app for temporary impersonation but it wasn't
      abstracted to a reusable piece of code.  This is how I envisioned the code would
      look when developers used it. (simplified case)<br />
       <br /><font size="4">[</font><font color="#008080" size="4">Test</font><font size="3">]</font><br /><font size="4"><font color="#0000ff">public</font><font color="#0000ff">void</font> Test_A()
      {</font><br /><font color="#008080" size="4">    ILocation </font><font size="4">location
      = </font><font color="#008080" size="4">LocationServices</font><font size="4">.GetLocation("LOCATION_TYPE_A"</font><font size="4">);</font><font size="4"><font size="4"><br /></font></font><font color="#008080" size="4">    Assert</font><font size="4">.IsNotNull(location);</font><br /><font size="4"><font color="#008080">    </font><font color="#008000">//Impersonate
      a non supervisor.<br /></font></font><font size="4"><font color="#0000ff">    using</font> (<font color="#008080">IdentityBlock</font> idBloc
      = <font color="#0000ff">new</font><font color="#008080">IdentityBlock</font>(<font color="#800000">"HoboJoe"</font>))
      {</font><br /><font size="4">        idBloc.ToString(); <font color="#008000">//just
      to get rid of warnings.<br /></font></font><font size="4"><font color="#008080">       
      Assert</font>.IsFalse(location.CanViewPersonnel());</font><br /><font size="4">    }</font><br /><font color="#008000"><font size="4">    //Impersonate an actual Supervisor.</font><br /></font><font size="4"><font color="#0000ff">    using</font> (<font color="#008080">IdentityBlock</font> idBloc
      = <font color="#0000ff">new</font><font color="#008080">IdentityBlock</font>(<font color="#800000">"JoeCool"</font>))
      {</font><br /><font size="4">        idBloc.ToString(); <font color="#008000">//just
      to get rid of warnings.<br /></font></font><font size="4"><font color="#008080">       
      Assert</font>.IsTrue(location.CanViewPersonnel());</font><br /><font size="4">    }</font><br /><font size="4">}</font><br /><font size="4"></font> <br />
      Now I was off to create the IdendityBlock class to abstract the impersonation code
      away.  So I headed home for the night.  After all this is when the
      real creative work starts.  If you are going to write Impersonation code
      then keep Keith Browns <a title="book/wiki" href="http://pluralsight.com/wiki/default.aspx/Keith.GuideBook.HomePage">book/wiki</a> close
      by.  
      <br />
      This is what I came up with:
   </p>
        <p>
          <br />
          <font color="#0000ff">
            <font size="4">public</font>
          </font>
          <font size="4">
            <font color="#000000">
            </font>
            <font color="#0000ff">class</font>
            <font color="#000000">
            </font>
            <font color="#008080">IdentityBlock</font>
            <font color="#000000"> : </font>
            <font color="#008080">IDisposable</font>
            <font color="#000000"> {</font>
          </font>
          <br />
          <font size="4">
            <font color="#008080">    WindowsImpersonationContext</font> wic;</font>
          <br />
          <font size="4">   [<font color="#008080">DllImport</font>(<font color="#800000">"advapi32.dll"</font>,
      SetLastError=<font color="#0000ff">true</font>)]</font>
          <br />
          <font size="4">
            <font color="#0000ff">   static</font>
            <font color="#0000ff">extern</font>
            <font color="#0000ff">bool</font> LogonUser( </font>
          <br />
          <font size="4">
            <font color="#0000ff">                                               
      string</font> principal,</font>
          <br />
          <font size="4">
            <font color="#0000ff">                                               
      string</font> authority,</font>
          <br />
          <font size="4">
            <font color="#0000ff">                                               
      string</font> password,</font>
          <br />
          <font size="4">
            <font color="#008080">                                               
      LogonTypes</font> logonType,</font>
          <br />
          <font size="4">
            <font color="#008080">                                               
      LogonProviders</font> logonProvider,</font>
          <br />
          <font size="4">
            <font color="#0000ff">                                               
      out</font>
            <font color="#008080">IntPtr</font> token);</font>
          <br />
          <font size="4">    </font>
          <br />
          <font size="4">    [<font color="#008080">DllImport</font>(<font color="#800000">"kernel32.dll"</font>,
      SetLastError=<font color="#0000ff">true</font>)]</font>
          <br />
          <font size="4">
            <font color="#0000ff">    static</font>
            <font color="#0000ff">extern</font>
            <font color="#0000ff">bool</font> CloseHandle(<font color="#008080">IntPtr</font> handle);</font>
          <br />
          <font size="4">
            <font color="#0000ff">    </font>
          </font>
          <br />
          <font size="4">
            <font color="#0000ff">    enum</font>
            <font color="#008080">LogonTypes</font> : <font color="#0000ff">uint</font> {</font>
          <br />
          <font size="4">        Interactive = 2,</font>
          <br />
          <font size="4">        Network,</font>
          <br />
          <font size="4">        Batch,</font>
          <br />
          <font size="4">        Service,</font>
          <br />
          <font size="4">        NetworkCleartext = 8,</font>
          <br />
          <font size="4">        NewCredentials</font>
          <br />
          <font size="4">    }</font>
          <br />
          <font size="4">
            <font color="#0000ff">    </font>
          </font>
          <br />
          <font size="4">
            <font color="#0000ff">    enum</font>
            <font color="#008080">LogonProviders</font> : <font color="#0000ff">uint</font> {</font>
          <br />
          <font size="4">        Default = 0, <font color="#008000">//
      default for platform (use this!)<br /></font></font>
          <font size="4">        WinNT35, <font color="#008000">//
      sends smoke signals to authority<br /></font></font>
          <font size="4">        WinNT40, <font color="#008000">//
      uses NTLM<br /></font></font>
          <font size="4">        WinNT50 <font color="#008000">//
      negotiates Kerb or NTLM<br /></font></font>
          <font size="4">    }</font>
          <br />
          <font size="4">
            <font color="#0000ff">
            </font>
          </font> <br /><font size="4"><font color="#0000ff">    public</font> IdentityBlock(<font color="#0000ff">string</font> user)
      {</font><br /><font size="4">        SetThreadIdentity(user);</font><br /><font size="4">    }</font><br /><font size="4"><font color="#0000ff"></font></font> <br /><font size="4"><font color="#0000ff">    public</font> IdentityBlock(<font color="#0000ff">string</font> user, <font color="#0000ff">bool</font> impersonateMe)
      {</font><br /><font size="4"><font color="#0000ff">        if</font>(impersonateMe)
      {</font><br /><font size="4">           
      wic = ImpersonateUser(user);</font><br /><font size="4">        }</font><br /><font size="4"><font color="#0000ff">        else</font> {</font><br /><font size="4">           
      SetThreadIdentity(user);</font><br /><font size="4">        }</font><br /><font size="4">    }</font><br /><font size="4">    ~IdentityBlock() {</font><br /><font size="4"><font color="#0000ff">           
      this</font>.Dispose(<font color="#0000ff">false</font>);</font><br /><font size="4">    }</font><br /><font size="4"></font> <br /><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;summary&gt;<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"> Set
      the thread identity<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;/summary&gt;<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;param
      name="user"&gt;&lt;/param&gt;<br /></font></font><font size="4"><font color="#0000ff">    private</font><font color="#0000ff">void</font> SetThreadIdentity(<font color="#0000ff">string</font> user)
      {</font><br /><font size="4"><font color="#008080">        WindowsIdentity</font> id;</font><br /><font size="4"></font><br /><font size="4"><font color="#0000ff">        string</font> pwd
      = <font color="#800000">GetPassword(user); <font color="#008000">// psuedo code</font></font></font><br /><font size="4"><font color="#008080">        IntPtr</font> token;</font><br /><font size="4"><font color="#0000ff">        bool</font> result
      = LogonUser(</font><br /><font size="4">                                             
      user, <font color="#800000">"[Put_Your_Domain_Here]"</font>, <font color="#008000"><br /></font></font><font size="4">                                             
      pwd,</font><br /><font size="4"><font color="#008080">                                             
      LogonTypes</font>.Interactive, </font><br /><font size="4"><font color="#008080">                                             
      LogonProviders</font>.Default,</font><br /><font size="4"><font color="#0000ff">                                             
      out</font> token);</font><br /><font size="4"><font color="#0000ff">        </font></font><br /><font size="4"><font color="#0000ff">        if</font> (result)
      {</font><br /><font color="#008000"><font size="4">            </font></font><font size="4">id
      = <font color="#0000ff">new</font><font color="#008080">WindowsIdentity</font>(token);</font><br /><font size="4">           
      CloseHandle(token);</font><br /><font size="4"><font color="#008080">           
      WindowsPrincipal</font> p = <font color="#0000ff">new</font><font color="#008080">WindowsPrincipal</font>(id);</font><br /><font size="4">           
      System.Threading.<font color="#008080">Thread</font>.CurrentPrincipal = p;</font><br /><font size="4">        }</font><br /><font size="4"><font color="#0000ff">        else</font> {</font><br /><font size="4"><font color="#008080">           
      Console</font>.WriteLine(<font color="#800000">"LogonUser failed: {0}"</font>, </font><br /><font size="4">                <font color="#008080">Marshal</font>.GetLastWin32Error());</font><br /><font size="4"><font color="#0000ff">           
      throw</font><font color="#0000ff">new</font><font color="#008080">Exception</font>(<font color="#0000ff">string</font>.Format(<font color="#800000">"LogonUser
      failed: {0}. User: {1}"</font>,<font color="#008080">      </font></font><br /><font size="4"><font color="#008080">               
      Marshal</font>.GetLastWin32Error(), user));</font><br /><font size="4">        }</font><br /><font size="4">    }</font><br /><font size="4"></font> <br /><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;summary&gt;<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"> Set
      the thread identity and impersonate.<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;/summary&gt;<br /></font></font><font size="4"><font color="#808080"><br /></font></font><font size="4"><font color="#0000ff">    private</font><font color="#000000"></font><font color="#008080">WindowsImpersonationContext</font><font color="#000000"> ImpersonateUser(</font><font color="#0000ff">string</font><font color="#000000"> user)
      {</font></font><font color="#000000" size="3"></font><br /><br /><font size="4"><font color="#008080">        WindowsIdentity</font> id;</font><br /><font size="4"></font><br /><font size="4"><font color="#0000ff">        string</font> pwd
      = <font color="#800000">GetPassword(user); </font><font color="#008000">// psuedo
      code</font></font><br /><font size="4"><font color="#008080">        IntPtr</font> token;</font><br /><font size="4"><font color="#0000ff">        bool</font> result
      = LogonUser(</font><br /><font size="4">                                             
      user, </font><br /><font size="4">                                              <font color="#800000">"[Put_Your_Domain_Here]"</font><font color="#000000">, </font><font color="#008000"><br /></font></font><font size="4">                                             
      pwd,</font><br /><font size="4"><font color="#008080">                                             
      LogonTypes</font>.Interactive, </font><br /><font size="4"><font color="#008080">                                              LogonProviders</font>.Default,</font><br /><font size="4"><font color="#0000ff">                                             
      out</font> token);</font><br /><font size="4"><font color="#0000ff">        if</font> (result)
      {</font><br /><font size="4">           
      id = <font color="#0000ff">new</font><font color="#008080">WindowsIdentity</font>(token);</font><br /><font size="4">           
      CloseHandle(token);</font><br /><font size="4"><font color="#008080">           
      WindowsPrincipal</font> p = <font color="#0000ff">new</font><font color="#008080">WindowsPrincipal</font>(id);</font><br /><font size="4">            System.Threading.<font color="#008080">Thread</font>.CurrentPrincipal
      = p;</font><br /><font size="4"><font color="#0000ff">           
      return</font> id.Impersonate();</font><br /><font size="4">        }</font><br /><font size="4"><font color="#0000ff">        else</font> {</font><br /><font size="4"><font color="#008080">           
      Console</font>.WriteLine(<font color="#800000">"LogonUser failed: {0}"</font>,</font><br /><font size="4"><font color="#008080">               
      Marshal</font>.GetLastWin32Error());</font><br /><font size="4"><font color="#0000ff">           
      throw</font><font color="#0000ff">new</font><font color="#008080">Exception</font>(<font color="#0000ff">string</font>.Format(<font color="#800000">"LogonUser
      failed: {0}. User: {1}"</font>,<font color="#008080">             </font></font><br /><font size="4"><font color="#008080">               
      Marshal</font>.GetLastWin32Error(), user));</font><br /><font size="4">        }</font><br /><font size="4">    }</font><br /><font size="4"></font><br /><font size="4"></font><br /><font size="4"></font><br /><font color="#0000ff"><font size="4"></font> <br /><font size="4">    #region</font></font><font color="#000000" size="4"> IDisposable
      Members</font><br /><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;summary&gt;<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"> Dispose
      of this object's resources.<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;/summary&gt;<br /></font></font><font size="4"><font color="#0000ff">    public</font><font color="#0000ff">void</font> Dispose()
      {</font><br /><font size="4">        Dispose(<font color="#0000ff">true</font>);</font><br /><font size="4"><font color="#008080">        GC</font>.SuppressFinalize(<font color="#0000ff">true</font>); <font color="#008000">//
      as a service to those who might inherit from us<br /></font></font><font size="4">    }</font><br /><font size="4"><font color="#808080"></font></font> <br /><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;summary&gt;<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"> Free
      the instance variables of this object.<br /></font></font><font size="4"><font color="#808080">    ///</font><font color="#008000"></font><font color="#808080">&lt;/summary&gt;<br /></font></font><font size="4"><font color="#0000ff">    protected</font><font color="#0000ff">virtual</font><font color="#0000ff">void</font> Dispose(<font color="#0000ff">bool</font> disposing)
      {</font><br /><font size="4"><font color="#0000ff">        if</font> (!
      disposing)</font><br /><font size="4"><font color="#0000ff">           
      return</font>; <font color="#008000">// we're being collected, so let the GC take
      care of this object<br /></font></font><font size="4"><font color="#0000ff">       
      else</font> {</font><br /><font size="4"><font color="#0000ff">           
      if</font>(wic != <font color="#0000ff">null</font>) wic.Undo();</font><br /><font size="4"><font color="#008080">               
      WindowsPrincipal</font> p = <font color="#0000ff">new</font><font color="#008080">WindowsPrincipal</font>(<font color="#008080">WindowsIdentity</font>.GetCurrent());</font><br /><font size="4">               
      System.Threading.<font color="#008080">Thread</font>.CurrentPrincipal = p;</font><br /><font size="4">           
      }</font><br /><font size="4">    }</font><br /><font size="4">    <font color="#0000ff" size="4">#endregion<br /></font></font><font color="#000000" size="4">}</font><br /><font color="#000000" size="4"></font> <br /><font size="4"><font size="2">Note:  I supply the user name to the IdentiyBlock
      constructor.  And then in the guts of the the IdentityBlock I am tied to a GetPassword
      implementation.  Rather it be hard coded or a Static helper class.  But
      even in a UnitTest harness you need to figure out a secure method to protecting these
      Prinicpals.  If you are lucky enough to be on a native Windows 2003 AD then you
      could use Protocal Transition.  Maybe I will come back to this some day polish
      that last piece.</font></font><br />
       <br />
      Comments and ideas are welcome.<br />
       <br />
      And I was working with NUnit.  I believe that tools like MBUnit may have impersonation
      abstraction features build in.  Don't quote me on that.<br /></p>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=78e50c9e-b873-46a1-b435-c64765135716" />
      </body>
      <title>NUnit and Impersonation Blocks</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,78e50c9e-b873-46a1-b435-c64765135716.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,78e50c9e-b873-46a1-b435-c64765135716.aspx</link>
      <pubDate>Sun, 11 Dec 2005 22:48:13 GMT</pubDate>
      <description>&lt;p&gt;
   Recently, ok&amp;nbsp;more than&amp;nbsp;7 or 8 months ago.&amp;nbsp; It&amp;nbsp;has been&amp;nbsp;a
   while since&amp;nbsp;I last blogged.&amp;nbsp; I was working on a intranet web application&amp;nbsp;and
   faced with testing role based business rules.&amp;nbsp; I needed to impersonate users
   temporarily.&amp;nbsp; I needed both positive and negative tests.&amp;nbsp; I needed to package
   the impersonation code so all developer on our team could easily reuse.&amp;nbsp; I needed
   to do it over night so team members that needed it could start right away.&amp;nbsp; I
   already implemented some code in our app for temporary impersonation but it wasn't
   abstracted to a reusable piece of code.&amp;nbsp; This is how I envisioned the code would
   look when developers used it. (simplified case)&lt;br&gt;
   &amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;[&lt;/font&gt;&lt;font color=#008080 size=4&gt;Test&lt;/font&gt;&lt;font size=3&gt;]&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;public&lt;/font&gt; &lt;font color=#0000ff&gt;void&lt;/font&gt; Test_A()
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font color=#008080 size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ILocation &lt;/font&gt;&lt;font size=4&gt;location
   = &lt;/font&gt;&lt;font color=#008080 size=4&gt;LocationServices&lt;/font&gt;&lt;font size=4&gt;.GetLocation("LOCATION_TYPE_A"&lt;/font&gt;&lt;font size=4&gt;);&lt;/font&gt;&lt;font size=4&gt;&lt;font size=4&gt;
   &lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font color=#008080 size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assert&lt;/font&gt;&lt;font size=4&gt;.IsNotNull(location);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color=#008000&gt;//Impersonate
   a non supervisor.&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using&lt;/font&gt; (&lt;font color=#008080&gt;IdentityBlock&lt;/font&gt; idBloc
   = &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;IdentityBlock&lt;/font&gt;(&lt;font color=#800000&gt;"HoboJoe"&lt;/font&gt;))
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; idBloc.ToString(); &lt;font color=#008000&gt;//just
   to get rid of warnings.&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Assert&lt;/font&gt;.IsFalse(location.CanViewPersonnel());&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font color=#008000&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Impersonate an actual Supervisor.&lt;/font&gt;
   &lt;br&gt;
   &lt;/font&gt;&lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; using&lt;/font&gt; (&lt;font color=#008080&gt;IdentityBlock&lt;/font&gt; idBloc
   = &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;IdentityBlock&lt;/font&gt;(&lt;font color=#800000&gt;"JoeCool"&lt;/font&gt;))
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; idBloc.ToString(); &lt;font color=#008000&gt;//just
   to get rid of warnings.&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Assert&lt;/font&gt;.IsTrue(location.CanViewPersonnel());&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;}&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   Now I was off to create the IdendityBlock class to abstract the impersonation code
   away.&amp;nbsp; So I headed home for the night.&amp;nbsp; After all&amp;nbsp;this is when the
   real&amp;nbsp;creative work starts.&amp;nbsp; If you are going to write Impersonation code
   then keep Keith Browns &lt;a title=book/wiki href="http://pluralsight.com/wiki/default.aspx/Keith.GuideBook.HomePage"&gt;book/wiki&lt;/a&gt; close
   by.&amp;nbsp; 
   &lt;br&gt;
   This is what I came up with:
&lt;/p&gt;
&lt;p&gt;
   &lt;br&gt;
   &lt;font color=#0000ff&gt;&lt;font size=4&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;font color=#0000ff&gt;class&lt;/font&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;font color=#008080&gt;IdentityBlock&lt;/font&gt;&lt;font color=#000000&gt; : &lt;/font&gt;&lt;font color=#008080&gt;IDisposable&lt;/font&gt;&lt;font color=#000000&gt; {&lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WindowsImpersonationContext&lt;/font&gt; wic;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp; [&lt;font color=#008080&gt;DllImport&lt;/font&gt;(&lt;font color=#800000&gt;"advapi32.dll"&lt;/font&gt;,
   SetLastError=&lt;font color=#0000ff&gt;true&lt;/font&gt;)]&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp; static&lt;/font&gt; &lt;font color=#0000ff&gt;extern&lt;/font&gt; &lt;font color=#0000ff&gt;bool&lt;/font&gt; LogonUser( &lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   string&lt;/font&gt; principal,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   string&lt;/font&gt; authority,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   string&lt;/font&gt; password,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   LogonTypes&lt;/font&gt; logonType,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   LogonProviders&lt;/font&gt; logonProvider,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   out&lt;/font&gt; &lt;font color=#008080&gt;IntPtr&lt;/font&gt; token);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;font color=#008080&gt;DllImport&lt;/font&gt;(&lt;font color=#800000&gt;"kernel32.dll"&lt;/font&gt;,
   SetLastError=&lt;font color=#0000ff&gt;true&lt;/font&gt;)]&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; static&lt;/font&gt; &lt;font color=#0000ff&gt;extern&lt;/font&gt; &lt;font color=#0000ff&gt;bool&lt;/font&gt; CloseHandle(&lt;font color=#008080&gt;IntPtr&lt;/font&gt; handle);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; enum&lt;/font&gt; &lt;font color=#008080&gt;LogonTypes&lt;/font&gt; : &lt;font color=#0000ff&gt;uint&lt;/font&gt; {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interactive = 2,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Network,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Batch,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Service,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetworkCleartext = 8,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewCredentials&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; enum&lt;/font&gt; &lt;font color=#008080&gt;LogonProviders&lt;/font&gt; : &lt;font color=#0000ff&gt;uint&lt;/font&gt; {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default = 0, &lt;font color=#008000&gt;//
   default for platform (use this!)&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WinNT35, &lt;font color=#008000&gt;//
   sends smoke signals to authority&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WinNT40, &lt;font color=#008000&gt;//
   uses NTLM&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WinNT50 &lt;font color=#008000&gt;//
   negotiates Kerb or NTLM&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt; IdentityBlock(&lt;font color=#0000ff&gt;string&lt;/font&gt; user)
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetThreadIdentity(user);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt; IdentityBlock(&lt;font color=#0000ff&gt;string&lt;/font&gt; user, &lt;font color=#0000ff&gt;bool&lt;/font&gt; impersonateMe)
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/font&gt;(impersonateMe)
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wic
   = ImpersonateUser(user);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/font&gt; {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetThreadIdentity(user);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ~IdentityBlock() {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   this&lt;/font&gt;.Dispose(&lt;font color=#0000ff&gt;false&lt;/font&gt;);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; Set
   the thread identity&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;/summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;param
   name="user"&amp;gt;&amp;lt;/param&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private&lt;/font&gt; &lt;font color=#0000ff&gt;void&lt;/font&gt; SetThreadIdentity(&lt;font color=#0000ff&gt;string&lt;/font&gt; user)
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WindowsIdentity&lt;/font&gt; id;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;string&lt;/font&gt; pwd
   = &lt;font color=#800000&gt;GetPassword(user); &lt;font color=#008000&gt;// psuedo code&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IntPtr&lt;/font&gt; token;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bool&lt;/font&gt; result
   = LogonUser(&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   user, &lt;font color=#800000&gt;"[Put_Your_Domain_Here]"&lt;/font&gt;,&amp;nbsp;&lt;font color=#008000&gt;
   &lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   pwd,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   LogonTypes&lt;/font&gt;.Interactive, &lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   LogonProviders&lt;/font&gt;.Default,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   out&lt;/font&gt; token);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/font&gt; (result)
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font color=#008000&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;id
   = &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;WindowsIdentity&lt;/font&gt;(token);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CloseHandle(token);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   WindowsPrincipal&lt;/font&gt; p = &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;WindowsPrincipal&lt;/font&gt;(id);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Threading.&lt;font color=#008080&gt;Thread&lt;/font&gt;.CurrentPrincipal
   = p;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/font&gt; {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Console&lt;/font&gt;.WriteLine(&lt;font color=#800000&gt;"LogonUser failed: {0}"&lt;/font&gt;, &lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#008080&gt;Marshal&lt;/font&gt;.GetLastWin32Error());&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   throw&lt;/font&gt; &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;Exception&lt;/font&gt;(&lt;font color=#0000ff&gt;string&lt;/font&gt;.Format(&lt;font color=#800000&gt;"LogonUser
   failed: {0}. User: {1}"&lt;/font&gt;,&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Marshal&lt;/font&gt;.GetLastWin32Error(), user));&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; Set
   the thread identity and impersonate.&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;/summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;
   &lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private&lt;/font&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;font color=#008080&gt;WindowsImpersonationContext&lt;/font&gt;&lt;font color=#000000&gt; ImpersonateUser(&lt;/font&gt;&lt;font color=#0000ff&gt;string&lt;/font&gt;&lt;font color=#000000&gt; user)
   {&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=3&gt; &lt;/font&gt;
   &lt;br&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WindowsIdentity&lt;/font&gt; id;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&lt;/font&gt; pwd
   = &lt;font color=#800000&gt;GetPassword(user); &lt;/font&gt;&lt;font color=#008000&gt;// psuedo code&lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IntPtr&lt;/font&gt; token;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool&lt;/font&gt; result
   = LogonUser(&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   user, &lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=#800000&gt;"[Put_Your_Domain_Here]"&lt;/font&gt;&lt;font color=#000000&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color=#008000&gt;
   &lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   pwd,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   LogonTypes&lt;/font&gt;.Interactive, &lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LogonProviders&lt;/font&gt;.Default,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   out&lt;/font&gt; token);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/font&gt; (result)
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id
   = &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;WindowsIdentity&lt;/font&gt;(token);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CloseHandle(token);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   WindowsPrincipal&lt;/font&gt; p = &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;WindowsPrincipal&lt;/font&gt;(id);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Threading.&lt;font color=#008080&gt;Thread&lt;/font&gt;.CurrentPrincipal
   = p;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   return&lt;/font&gt; id.Impersonate();&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/font&gt; {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Console&lt;/font&gt;.WriteLine(&lt;font color=#800000&gt;"LogonUser failed: {0}"&lt;/font&gt;,&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Marshal&lt;/font&gt;.GetLastWin32Error());&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   throw&lt;/font&gt; &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;Exception&lt;/font&gt;(&lt;font color=#0000ff&gt;string&lt;/font&gt;.Format(&lt;font color=#800000&gt;"LogonUser
   failed: {0}. User: {1}"&lt;/font&gt;,&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   Marshal&lt;/font&gt;.GetLastWin32Error(), user));&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;/font&gt;
   &lt;br&gt;
   &lt;font color=#0000ff&gt;&lt;font size=4&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=4&gt; IDisposable
   Members&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; Dispose
   of this object's resources.&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;/summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public&lt;/font&gt; &lt;font color=#0000ff&gt;void&lt;/font&gt; Dispose()
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dispose(&lt;font color=#0000ff&gt;true&lt;/font&gt;);&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GC&lt;/font&gt;.SuppressFinalize(&lt;font color=#0000ff&gt;true&lt;/font&gt;); &lt;font color=#008000&gt;//
   as a service to those who might inherit from us&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#808080&gt;&lt;/font&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; Free
   the instance variables of this object.&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#808080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///&lt;/font&gt;&lt;font color=#008000&gt; &lt;/font&gt;&lt;font color=#808080&gt;&amp;lt;/summary&amp;gt;&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected&lt;/font&gt; &lt;font color=#0000ff&gt;virtual&lt;/font&gt; &lt;font color=#0000ff&gt;void&lt;/font&gt; Dispose(&lt;font color=#0000ff&gt;bool&lt;/font&gt; disposing)
   {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&lt;/font&gt; (!
   disposing)&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   return&lt;/font&gt;; &lt;font color=#008000&gt;// we're being collected, so let the GC take care
   of this object&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   else&lt;/font&gt; {&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#0000ff&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   if&lt;/font&gt;(wic != &lt;font color=#0000ff&gt;null&lt;/font&gt;) wic.Undo();&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&lt;font color=#008080&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   WindowsPrincipal&lt;/font&gt; p = &lt;font color=#0000ff&gt;new&lt;/font&gt; &lt;font color=#008080&gt;WindowsPrincipal&lt;/font&gt;(&lt;font color=#008080&gt;WindowsIdentity&lt;/font&gt;.GetCurrent());&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
   System.Threading.&lt;font color=#008080&gt;Thread&lt;/font&gt;.CurrentPrincipal = p;&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;
   &lt;br&gt;
   &lt;font size=4&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=#0000ff size=4&gt;#endregion&lt;br&gt;
   &lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=4&gt;}&lt;/font&gt;
   &lt;br&gt;
   &lt;font color=#000000 size=4&gt;&lt;/font&gt;&amp;nbsp;&lt;br&gt;
   &lt;font size=4&gt;&lt;font size=2&gt;Note:&amp;nbsp; I supply the user name to the IdentiyBlock constructor.&amp;nbsp;
   And then in the guts of the the IdentityBlock I am tied to a GetPassword implementation.&amp;nbsp;
   Rather it be hard coded or a Static helper class.&amp;nbsp; But even in a UnitTest harness
   you need to figure out a secure method to protecting these Prinicpals.&amp;nbsp; If you
   are lucky enough to be on a native Windows 2003 AD then you could use Protocal Transition.&amp;nbsp;
   Maybe I will come back to this some day polish that last piece.&lt;/font&gt;&lt;/font&gt;
   &lt;br&gt;
   &amp;nbsp;&lt;br&gt;
   Comments and ideas are welcome.&lt;br&gt;
   &amp;nbsp;&lt;br&gt;
   And I was working with NUnit.&amp;nbsp; I believe that tools like MBUnit may have impersonation
   abstraction&amp;nbsp;features build in.&amp;nbsp; Don't quote me on that.&lt;br&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=78e50c9e-b873-46a1-b435-c64765135716" /&gt;</description>
    </item>
    <item>
      <trackback:ping>http://www.deploymentcentric.com/Blogs/joe/Trackback.aspx?guid=f346225f-ae6c-4236-a498-a2bcc3d181f9</trackback:ping>
      <pingback:server>http://www.deploymentcentric.com/Blogs/joe/pingback.aspx</pingback:server>
      <pingback:target>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f346225f-ae6c-4236-a498-a2bcc3d181f9.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I like the part about "hard work that very few people have the courage and patience
      to undertake".  I have worked with a lot of bright people.  Most if not
      all avoid playing out the full implementation of a secure deployment.  Do they
      lack courage or patience?  Why?  I still don't know many developers that
      know much about their platform.  My context is Windows.  I always feel like
      I have more to learn about <span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: Verdana; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">platform </span>but
      I have yet to work with a dev that gets it more than I do.  Am I alone?  
   </p>
        <p>
      Quotes from <span class="headline"><a href="http://www.securityfocus.com/columnists/334">Interview
      with Marcus Ranum</a></span><br /></p>
        <blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
          <p>
            <em>It's not a technology problem, it's a management problem. There are plenty of
      tools that can be used to control inter-host trust, but they are generally not used
      because they're "too hard" or "inconvenient" or whatever. </em>
          </p>
          <p>
            <em>In order to build really secure systems you need to understand the trust relationships
      between your systems and then build your systems to enhance and support your mission
      based on those trust relationships. But that's <b>hard work</b> that very few people
      have the courage and patience to undertake. So instead, they want to just throw technology
      at the problem - which won't work - because there is no amount of technology that
      can effectively build your trust relationships for you if you don't understand them
      yourself.</em> d
   </p>
        </blockquote>
        <img width="0" height="0" src="http://www.deploymentcentric.com/Blogs/joe/aggbug.ashx?id=f346225f-ae6c-4236-a498-a2bcc3d181f9" />
      </body>
      <title>There is no amount of technology</title>
      <guid>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f346225f-ae6c-4236-a498-a2bcc3d181f9.aspx</guid>
      <link>http://www.deploymentcentric.com/Blogs/joe/PermaLink,guid,f346225f-ae6c-4236-a498-a2bcc3d181f9.aspx</link>
      <pubDate>Wed, 13 Jul 2005 08:25:23 GMT</pubDate>
      <description>&lt;p&gt;
   I like the part about "hard work that very few people have the courage and patience
   to undertake".&amp;nbsp;