<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Bjornhaug.com</title>
    <link>http://www.bjornhaug.com/</link>
    <description>The Leading World-Class Professional Enterprise-Quality Syndicated Blog about me</description>
    <language>en-us</language>
    <copyright>Bjørn Erik Haug</copyright>
    <lastBuildDate>Tue, 15 May 2007 09:15:14 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.8.5223.2</generator>
    <managingEditor>behaug@gmail.com</managingEditor>
    <webMaster>behaug@gmail.com</webMaster>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=e9dcc139-a25c-4992-aed0-5a1141baa3de</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,e9dcc139-a25c-4992-aed0-5a1141baa3de.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,e9dcc139-a25c-4992-aed0-5a1141baa3de.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=e9dcc139-a25c-4992-aed0-5a1141baa3de</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      WTF!? What am I supposed to do when I have to unlock, but the inputs are disabled?
   </p>
        <img src="http://www.bjornhaug.com/content/binary/disabled login.JPG" border="0" />
      </body>
      <title>You must log in! You can't log in!</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,e9dcc139-a25c-4992-aed0-5a1141baa3de.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,e9dcc139-a25c-4992-aed0-5a1141baa3de.aspx</link>
      <pubDate>Tue, 15 May 2007 09:15:14 GMT</pubDate>
      <description>&lt;p&gt;
   WTF!? What am I supposed to do when I have to unlock, but the inputs are disabled?
&lt;/p&gt;
&lt;img src="http://www.bjornhaug.com/content/binary/disabled login.JPG" border=0&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,e9dcc139-a25c-4992-aed0-5a1141baa3de.aspx</comments>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=a2354ac1-820e-4609-8fe7-decf674d3ec2</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,a2354ac1-820e-4609-8fe7-decf674d3ec2.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,a2354ac1-820e-4609-8fe7-decf674d3ec2.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=a2354ac1-820e-4609-8fe7-decf674d3ec2</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div>I've been working on using Windows Forms UserControls hosted inside of IE. It's
      easy to get started, but there's very little good information to be found on the details
      of this out there. Especially for running them in an intranet where you don't want
      to configure the security settings on every client machine. Here are some of the things
      I've figured out while making this work.
   </div>
        <div> 
   </div>
        <div>I won't go into the basics. You can easily find this information on Google.
      Try <a href="http://www.15seconds.com/Issue/030610.htm"><font color="#0000cc">this
      one</font></a> for instance. Also, if what you need is pretty graphics and not application
      logic, consider using Flash or <a href="http://www.microsoft.com/silverlight/"><font color="#0000cc">Silverlight</font></a> instead.
   </div>
        <div> 
   </div>
        <div>I was trying to get my usercontrol to play under the restricted Intranet Zone.
      This is the Zone that IE uses when there are no dots in the domain name, like localhost
      or a local intranet server name. It's only slightly more permissive than the Internet
      Zone, and it's still giving a lot of issues.
   </div>
        <div> 
   </div>
        <div>
          <strong>Allow partially trusted callers</strong>
        </div>
        <div>To make the control at all load in the browser in the Local Intranet Zone, the
      assembly and all references assemblies need to allow partially trusted callers. To
      enable this, put <strong>[assembly: System.Security.AllowPartiallyTrustedCallers]</strong> in
      the AssemblyInfo.cs file of the class library containing the control. You can't reference
      assemblies that don't have this tag, or your control won't load. Also, be sure you
      don't call any methods that require more trust than the Local Intranet Zone provides,
      or you'll get an exception.
   </div>
        <div> 
   </div>
        <div>
          <strong>Troubleshooting</strong>
        </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Try Full Trust</em>
          </strong>
        </div>
        <div>If you are having trouble getting your control to display, try and set the LocalIntranet
      Zone to run with FullTrust permissions. This is done in the Control Panel &gt; Administrative
      Tools &gt; .Net Framework 2.0 Configuration tool (assuming NetFx 2.0). Navigate to
      the My Computer &gt; Runtime Security Policy &gt; Machine &gt; Code Groups &gt; All_Code &gt;
      LocalIntranet_Zone node. Right click it and go to Properties. Under the Permission
      Set tab, change the dropdown from LocalIntranet to FullTrust, and click OK. 
   </div>
        <div> 
   </div>
        <div>Now everything running from <a href="http://localhost/">http://localhost</a> and
      any other hostname with no dots in it will have permission to format your harddrive.
      But just make sure your UserControl doesn't do anything malicious and you'll be ok.
      If your control works now, the problem was security. If it still doesn't then it's
      possibly a loading error, or an exception in your code.
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Logging</em>
          </strong>
        </div>
        <div>Internet Explorer gives very little indication on the web page to what may be
      wrong. But there is a way to have it log what it's doing when trying to load and instantiate
      your control. This logging is <a href="http://support.microsoft.com/kb/313892">enabled
      in the registry</a>. This can tell you whether the DLL wasn't found, or of there was
      an exception when instantiating it. You can also monitor the assembly loading with
      the <a href="http://msdn2.microsoft.com/en-us/library/e74a18c4(vs.80).aspx"><font color="#0000cc">Assembly
      Binding Log Viewer</font></a>. Open this by starting the Visual Studio 2005 Command
      Prompt and typing <strong>fuslogvw</strong>. 
   </div>
        <div> 
   </div>
        <div>Also you can take a look at the IIS logfiles for the website you are running
      the control in to see if the DLLs are getting downloaded. HTTP code 200 means OK,
      and 304 means it was taken from cache. 
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Avoid the Bin directory</em>
          </strong>
        </div>
        <div>Remember that the bin directory on an ASP.NET website does not allow retrieving
      DLL files. So don't put your control in there. This rules out adding a Copy Local
      reference to the control's project to have it copied automatically. Rather set up
      an xcopy command in the Post-build events of the control's project that copies the
      compiled files to the web project.
   </div>
        <div> 
   </div>
        <div>
          <em>
            <strong>Clear Download Cache</strong>
          </em>
        </div>
        <div>The .Net Framework will cache the downloaded assemblies in the Download Cache.
      Under development this can sometimes cause some problems with the DLL not getting
      updated. This cache can be cleared with the gacutil utility by issuing the command <strong>gacutil /cdl</strong>.
      I recommend adding this as a build action on the project containing the control. Go
      to properties on the project in Visual Studio and in the Build Events tab put this
      line in the "Post-build events command line" box: <strong>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil.exe
      /cdl</strong>. Now the cache will be cleared each time you build a new DLL. Just note
      that the browser needs to be closed when you clear the cache, or it will hold a lock
      on the DLL and the clear will fail.
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Use IIS, not the VS built-in web server</em>
          </strong>
        </div>
        <div>I've had some strange caching issues when running from the built-in web server
      in Visual Studio. Switching to using IIS instead made everything work much better.
      Open the properties on the web project in Visual Studio, and under the Web tab choose
      to Use IIS Web Server, and click the Create Virtual Directory button.
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Attach the debugger</em>
          </strong>
        </div>
        <div>You can attach the debugger to IE and be able to debug the control. But you will
      have to manually attach to IE after you have loaded the page. If VS is set ut
      to attach to IE when you start the project, it will not get attached to the managed
      host within IE, and you will not be able to debug. 
   </div>
        <div> 
   </div>
        <div>This means you won't be able to debug the initalization of your control.
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Separate assembly baseclass</em>
          </strong>
        </div>
        <div>One more thing to notice: Your control will not work if you inherit from a baseclass
      in a different assembly, even though that baseclass inherits from UserControl. I guess
      the IEHost will check for inheritance on UserControl before it loads the dependent
      assembly. If you need all your controls to be castable to some common type, or to
      expose the same methods and properties, consider having them all implement a common
      interface.
   </div>
        <div> 
   </div>
        <div>
          <strong>JavaScript</strong>
        </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>COM visible</em>
          </strong>
        </div>
        <div>You control can interact with JavaScript in the page. The public properties and
      methods on your control are usable from javascript. Just have the script get a reference
      to the object tag and then just call the methods and properties by name (only simple
      types like string, int and double works though). But before javascript can access
      your methods and properties you need to make your control COM visible. This is done
      in the AssemblyInfo.cs file by adding (or changing) this attribute: <strong>[assembly:
      ComVisible(true)]</strong>. By default this is set to false, but needs to be true.
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Polling instead of events</em>
          </strong>
        </div>
        <div>UserControls are also able to <a href="http://weblogs.asp.net/stevencohn/archive/2004/05/24/140201.aspx"><font color="#0000cc">fire
      events that can be handled in javascript</font></a>. But this requires Managed Code
      permissions, which is not available in the Local Intranet Zone. So events won't work.
      If you need your javascript to know when something happens in your control without
      using events, you can make your control expose a property that indicates event
      state, and then have a javascript timer poll on that property. This isn't as nice
      as real events, but does the job.
   </div>
        <div> 
   </div>
        <div>
          <strong>Issues</strong>
        </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Resizing is blocked</em>
          </strong>
        </div>
        <div>A strange issue with the Local Intranet Zone permissions is that resize events
      to the control are blocked. If you set your object tag to, say, 100% width and height,
      the control will be sized as expected when the page loads. But if you then resize
      the browser window, the control's content will not resize, and it will be clipped.
      Resizing works as it should with Full Trust. 
   </div>
        <div> 
   </div>
        <div>One way I've found to work around this strange quirk is to expose a SetSize(with,
      height) method on my control and have javascript in the page set the correct size
      on the document.onresize event. With some clever scripting I got this right.
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>Activation</em>
          </strong>
        </div>
        <div>Since the control is an embedded object, it is subject to the Click-To-Activate
      behaviour of Internet Explorer. This shouldn't be news to you. But the issue is that
      the control behaves really badly when it's not activated. It's slow to paint when
      you scroll the page and has all kinds of issues if you try to emulate paging with
      showing and hiding them. Once they are activated they work quite well. So if you experience
      problems, make sure the controls are activated before you decide that this technology
      is broken.
   </div>
        <div> 
   </div>
        <div>
          <strong>
            <em>WCF</em>
          </strong>
        </div>
        <div>If your control is calling back to the server using a web service, do not implement
      this using WCF in the control. The System.ServiceModel assembly do not have the
      AllowPartiallyTrustedCallers attribute, and will cause your control not to load under
      Local Intranet Zone if you reference it. Rather use normal web services.
   </div>
        <div> 
   </div>
        <div> 
   </div>
        <div>Please let me know if anything I've said here is wrong or inaccurate, or if there are
      some other issues I should know about. There is far too little info out there on these
      things. And what is there is hard to find because of the obvious searchability
      issue between web forms usercontrols and windows forms usercontrols.
   </div>
      </body>
      <title>Windows Forms UserControls in IE</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,a2354ac1-820e-4609-8fe7-decf674d3ec2.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,a2354ac1-820e-4609-8fe7-decf674d3ec2.aspx</link>
      <pubDate>Fri, 20 Apr 2007 22:47:05 GMT</pubDate>
      <description>&lt;div&gt;I've been working on using Windows Forms UserControls hosted inside of IE. It's
   easy to get started, but there's very little good information to be found on the details
   of this out there. Especially for running them in an intranet where you don't want
   to configure the security settings on every client machine. Here are some of the things
   I've figured out while making this work.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;I won't go into the basics. You can easily&amp;nbsp;find this information on Google.
   Try &lt;a href="http://www.15seconds.com/Issue/030610.htm"&gt;&lt;font color=#0000cc&gt;this one&lt;/font&gt;&lt;/a&gt; for
   instance. Also, if what you need is pretty graphics and not application logic, consider
   using Flash or &lt;a href="http://www.microsoft.com/silverlight/"&gt;&lt;font color=#0000cc&gt;Silverlight&lt;/font&gt;&lt;/a&gt; instead.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;I was trying to get my usercontrol to play under the restricted Intranet Zone.
   This is the Zone that IE uses when there are no dots in the domain name, like localhost
   or a local intranet server name. It's only slightly more permissive than the Internet
   Zone,&amp;nbsp;and it's still giving a lot of issues.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Allow partially trusted callers&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;To make the control at all load in the browser in the Local Intranet Zone, the
   assembly and all references assemblies need to allow partially trusted callers. To
   enable this, put &lt;strong&gt;[assembly: System.Security.AllowPartiallyTrustedCallers]&lt;/strong&gt; in
   the AssemblyInfo.cs file of the class library containing the control. You can't reference
   assemblies that don't have this tag, or your control won't load. Also, be sure you
   don't call any methods that require more trust than the Local Intranet Zone provides,
   or you'll get an exception.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Troubleshooting&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Try Full Trust&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;If you are having trouble getting your control to display, try and set the LocalIntranet
   Zone to run with FullTrust permissions. This is done in the Control Panel &amp;gt; Administrative
   Tools &amp;gt; .Net Framework 2.0 Configuration tool (assuming NetFx 2.0). Navigate to
   the My Computer &amp;gt; Runtime Security Policy &amp;gt; Machine &amp;gt; Code Groups &amp;gt; All_Code&amp;nbsp;&amp;gt;
   LocalIntranet_Zone node. Right click it and go to Properties. Under the Permission
   Set tab, change the dropdown from&amp;nbsp;LocalIntranet to FullTrust, and click OK. 
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Now everything running&amp;nbsp;from &lt;a href="http://localhost/"&gt;http://localhost&lt;/a&gt;&amp;nbsp;and
   any other hostname with no dots in it will have permission to format your harddrive.
   But just make sure your UserControl doesn't do anything malicious and you'll be ok.
   If your control works now, the problem was security. If it still doesn't then it's
   possibly a loading error, or an exception in your code.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Logging&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;Internet Explorer gives very little indication on the web page to what may be
   wrong. But there is a way to have it log what it's doing when trying to load and instantiate
   your control. This logging is &lt;a href="http://support.microsoft.com/kb/313892"&gt;enabled
   in the registry&lt;/a&gt;. This can tell you whether the DLL wasn't found, or of there was
   an exception when instantiating it. You can also monitor the assembly loading with
   the&amp;nbsp;&lt;a href="http://msdn2.microsoft.com/en-us/library/e74a18c4(vs.80).aspx"&gt;&lt;font color=#0000cc&gt;Assembly
   Binding Log Viewer&lt;/font&gt;&lt;/a&gt;. Open this by starting the Visual Studio 2005 Command
   Prompt and typing &lt;strong&gt;fuslogvw&lt;/strong&gt;. 
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Also you can take a look at the IIS logfiles for the website you are running
   the control in to see if the DLLs are getting downloaded. HTTP code 200 means OK,
   and 304 means it was taken from cache. 
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Avoid the Bin directory&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;Remember that the bin directory on an ASP.NET website does not allow retrieving
   DLL files. So don't put your control in there. This rules out adding a Copy Local
   reference to the control's project to have it copied automatically. Rather set up
   an xcopy command in the Post-build events of the control's project that copies the
   compiled files to the web project.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;em&gt;&lt;strong&gt;Clear Download Cache&lt;/strong&gt;&lt;/em&gt;
&lt;/div&gt;
&lt;div&gt;The .Net Framework will cache the downloaded assemblies in the Download Cache.
   Under development this can sometimes cause some problems with the DLL not getting
   updated. This cache can be cleared with the gacutil utility by issuing the command &lt;strong&gt;gacutil&amp;nbsp;/cdl&lt;/strong&gt;.
   I recommend adding this as a build action on the project containing the control. Go
   to properties on the project in Visual Studio and in the Build Events tab put this
   line in the "Post-build events command line" box: &lt;strong&gt;C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil.exe
   /cdl&lt;/strong&gt;. Now the cache will be cleared each time you build a new DLL. Just note
   that the browser needs to be closed when you clear the cache, or it will hold a lock
   on the DLL and the clear will fail.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Use IIS, not the VS built-in web server&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;I've had some strange caching issues when running from the built-in web server
   in Visual Studio. Switching to using IIS instead made everything work much better.
   Open the properties on the web project in Visual Studio, and under the Web tab choose
   to Use IIS Web Server, and click the Create Virtual Directory button.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Attach the debugger&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;You can attach the debugger to IE and be able to debug the control. But you will
   have to manually attach to IE after you have loaded the page. If&amp;nbsp;VS is set ut
   to attach to IE when you start the project, it will not get attached to the managed
   host within IE, and you will not be able to debug. 
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;This means you won't be able to debug the initalization of your control.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Separate assembly baseclass&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;One more thing to notice: Your control will not work if you inherit from a baseclass
   in a different assembly, even though that baseclass inherits from UserControl. I guess
   the IEHost will check for inheritance on UserControl before it loads the dependent
   assembly. If you need all your controls to be castable to some common type, or to
   expose the same methods and properties, consider having them all implement a common
   interface.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;COM visible&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;You control can interact with JavaScript in the page. The public properties and
   methods on your control are usable from javascript. Just have the script get a reference
   to the object tag and then just call the methods and properties by name (only simple
   types like string, int and double works though).&amp;nbsp;But before javascript can access
   your methods and properties you need to make your control COM visible. This is done
   in the AssemblyInfo.cs file by adding (or changing) this attribute: &lt;strong&gt;[assembly:
   ComVisible(true)]&lt;/strong&gt;. By default this is set to false, but needs to be true.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Polling instead of events&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;UserControls are also able to &lt;a href="http://weblogs.asp.net/stevencohn/archive/2004/05/24/140201.aspx"&gt;&lt;font color=#0000cc&gt;fire
   events that can be handled in javascript&lt;/font&gt;&lt;/a&gt;. But this requires Managed Code
   permissions, which is not available in the Local Intranet Zone. So events won't work.
   If you need your javascript to know when something happens in your control without
   using events, you can make your control expose a property that indicates&amp;nbsp;event
   state, and then have a javascript timer poll on that property. This isn't as nice
   as real events, but does the job.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;Issues&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Resizing is blocked&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;A strange issue with the Local Intranet Zone permissions is that resize events
   to the control are blocked. If you set your object tag to, say, 100% width and height,
   the control will be sized as expected when the page loads. But if you then resize
   the browser window, the control's content will not resize, and it will be clipped.
   Resizing works as it should with Full Trust. 
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;One way I've found to work around this strange quirk is to expose a SetSize(with,
   height) method on my control and have javascript in the page set the correct size
   on the document.onresize event. With some clever scripting I got this right.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;Activation&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;Since the control is an embedded object, it is subject to the Click-To-Activate
   behaviour of Internet Explorer. This shouldn't be news to you. But the issue is that
   the control behaves really badly when it's not activated. It's slow to paint when
   you scroll the page and has all kinds of issues if you try to emulate paging with
   showing and hiding them. Once they are activated they work quite well. So if you experience
   problems, make sure the controls are activated before you decide that this technology
   is broken.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;strong&gt;&lt;em&gt;WCF&lt;/em&gt;&lt;/strong&gt;
&lt;/div&gt;
&lt;div&gt;If your control is calling back to the server using a web service, do not implement
   this using WCF in the control. The&amp;nbsp;System.ServiceModel assembly do not have the
   AllowPartiallyTrustedCallers attribute, and will cause your control not to load under
   Local Intranet Zone if you reference it. Rather use normal web services.
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;Please let me know if anything I've said here is wrong or inaccurate, or if there&amp;nbsp;are
   some other issues I should know about. There is far too little info out there on these
   things. And what is there is hard to find because of the obvious&amp;nbsp;searchability
   issue&amp;nbsp;between&amp;nbsp;web&amp;nbsp;forms usercontrols and&amp;nbsp;windows forms usercontrols.
&lt;/div&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,a2354ac1-820e-4609-8fe7-decf674d3ec2.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=b28ea3c4-c74b-4172-9a50-bdedf79bb51b</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,b28ea3c4-c74b-4172-9a50-bdedf79bb51b.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,b28ea3c4-c74b-4172-9a50-bdedf79bb51b.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b28ea3c4-c74b-4172-9a50-bdedf79bb51b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      We've got a <a href="http://www.villavent.co.uk/central-extraction-systems.htm">Villavent</a> at
      home. And it's quite practical, sort of. It's this ventilation system throughout the
      house that keeps the air fresh and transports odors out of the bathroom when someone
      has gone about their own business, and ventilates the moist air out from the
      shower so it doesn't go into the walls and ceiling and make it rot and grow little
      brown spots.
   </p>
        <p>
      It's all controlled from one central location; a knob on the kitchen fan above the
      stove. Turn it left and its a regular kitchen fan, turn it right and it starts sucking
      air from the pipes going to the bathroom and shower.
   </p>
        <p>
      It's just great. In theory, that is.
   </p>
        <p>
      In practice, I wake up in the morning all groggy and barely alive, stumbling
      out of bed and finding my way to the shower on auto pilot while rubbing my eyes
      with the back of my hands. At that point it's not so great that it order to <em>not
      ruin</em> the walls and ceiling and have them grow brown spots I have to first
      go upstairs to the kitchen and fiddle with knobs. For some reason it just
      doesn't get done. Somehow the bathroom is just not getting ventilated. And somehow
      brown spots have appeared.
   </p>
        <p>
      It's my own fault, I know. - Stupid Villavent.
   </p>
      </body>
      <title>Villavent</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,b28ea3c4-c74b-4172-9a50-bdedf79bb51b.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,b28ea3c4-c74b-4172-9a50-bdedf79bb51b.aspx</link>
      <pubDate>Tue, 30 Jan 2007 14:20:38 GMT</pubDate>
      <description>&lt;p&gt;
   We've got a &lt;a href="http://www.villavent.co.uk/central-extraction-systems.htm"&gt;Villavent&lt;/a&gt; at
   home. And it's quite practical, sort of. It's this ventilation system throughout the
   house that keeps the air fresh and transports odors out of the bathroom when someone
   has gone about their own business, and ventilates the moist air&amp;nbsp;out from the
   shower so it doesn't go into the walls and ceiling and make it rot and grow little
   brown spots.
&lt;/p&gt;
&lt;p&gt;
   It's all controlled from one central location; a knob on the kitchen fan above the
   stove. Turn it left and its a regular kitchen fan, turn it right and it starts sucking
   air from the pipes going to the bathroom and shower.
&lt;/p&gt;
&lt;p&gt;
   It's just great. In theory, that is.
&lt;/p&gt;
&lt;p&gt;
   In practice,&amp;nbsp;I wake up in the morning all groggy and barely alive, stumbling
   out of bed and finding&amp;nbsp;my way to the shower on auto pilot while rubbing my eyes
   with the back of&amp;nbsp;my hands. At that point it's not so great that it order to &lt;em&gt;not
   ruin&lt;/em&gt; the walls and ceiling and have them grow brown spots I have to&amp;nbsp;first
   go upstairs to the kitchen and fiddle with knobs.&amp;nbsp;For some reason&amp;nbsp;it just
   doesn't get done. Somehow the bathroom is just not getting ventilated. And somehow
   brown spots have appeared.
&lt;/p&gt;
&lt;p&gt;
   It's my own fault, I know. - Stupid Villavent.
&lt;/p&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,b28ea3c4-c74b-4172-9a50-bdedf79bb51b.aspx</comments>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=9f3b975d-c44e-4015-bff8-80fbb7262e49</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,9f3b975d-c44e-4015-bff8-80fbb7262e49.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,9f3b975d-c44e-4015-bff8-80fbb7262e49.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=9f3b975d-c44e-4015-bff8-80fbb7262e49</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I use the Tab key all the time. From navigating between input fields in applications
      to indenting my code. But sometimes when I press it it doesn't work. Instead I just
      start getting everything I type in capital letters.
   </p>
        <p>
      That's the Tab keys little brother. His <span style="FONT-STYLE: italic">evil</span> little
      brother whose only purpose in life seems to be to get in my way and annoy me. Why
      would I want to enable a permanent inversion of the capitalization of everything I
      type? I wouldn't. It's as useful as a "13375p34k" key that changes everything to geekish.
      It's of no practical use. If I want to write in all caps to yell at some bonehead
      in a forum I'll keep the shift key down. Or I'll select the text I wrote normally
      (but with a lot of aggrevation and hostility) and run the "Make Uppercase" command
      in my editor.
   </p>
        <p>
      So I don't want it anymore. I could physically rip the key off of the keyboard, but
      I don't want go to that extreme. So that's why I hit google and found this way to
      just relieve it from its duty.
   </p>
        <p>
      There's a registry key that lets you <a href="http://www.microsoft.com/whdc/device/input/w2kscan-map.mspx">remap
      keyboard scan codes</a> to other codes. So all you need to do is map the scancode
      of the caps lock key to something else, and the beast is tamed. I ended up choosing
      to map it to work just like a second Tab key. So when I miss the real Tab, its little
      brother is there to help instead of mess things up.
   </p>
        <p>
      I created a .reg file that contains this:
   </p>
        <pre>Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,0f,00,3a,00,00,00,00,00</pre>
        <p>
      Once you change this in the registry you will need to reboot before it takes effect.
   </p>
        <p>
      If you want more details and a list of possible scan codes check out <a href="http://www.usnetizen.com/fix_capslock.html">this
      page</a>.<br /></p>
      </body>
      <title>Taming the Tab key's little brother</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,9f3b975d-c44e-4015-bff8-80fbb7262e49.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,9f3b975d-c44e-4015-bff8-80fbb7262e49.aspx</link>
      <pubDate>Tue, 19 Dec 2006 12:16:59 GMT</pubDate>
      <description>&lt;p&gt;
   I use the Tab key all the time. From navigating between input fields in applications
   to indenting my code. But sometimes when I press it it doesn't work. Instead I just
   start getting everything I type in capital letters.
&lt;/p&gt;
&lt;p&gt;
   That's the Tab keys little brother. His &lt;span style="FONT-STYLE: italic"&gt;evil&lt;/span&gt; little
   brother whose only purpose in life seems to be to get in my way and annoy me. Why
   would I want to enable a permanent inversion of the capitalization of everything I
   type? I wouldn't. It's as useful as a "13375p34k" key that changes everything to geekish.
   It's of no practical use. If I want to write in all caps to yell at some bonehead
   in a forum I'll keep the shift key down. Or I'll select the text I wrote normally
   (but with a lot of aggrevation and hostility) and run the "Make Uppercase" command
   in my editor.
&lt;/p&gt;
&lt;p&gt;
   So I don't want it anymore. I could physically rip the key off of the keyboard, but
   I don't want go to that extreme. So that's why I hit google and found this way to
   just relieve it from its duty.
&lt;/p&gt;
&lt;p&gt;
   There's a registry key that lets you &lt;a href="http://www.microsoft.com/whdc/device/input/w2kscan-map.mspx"&gt;remap
   keyboard scan codes&lt;/a&gt; to other codes. So all you need to do is map the scancode
   of the caps lock key to something else, and the beast is tamed. I ended up choosing
   to map it to work just like a second Tab key. So when I miss the real Tab, its little
   brother is there to help instead of mess things up.
&lt;/p&gt;
&lt;p&gt;
   I created a .reg file that contains this:
&lt;/p&gt;
&lt;pre&gt;Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,0f,00,3a,00,00,00,00,00&lt;/pre&gt;
&lt;p&gt;
   Once you change this in the registry you will need to reboot before it takes effect.
&lt;/p&gt;
&lt;p&gt;
   If you want more details and a list of possible scan codes check out &lt;a href="http://www.usnetizen.com/fix_capslock.html"&gt;this
   page&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,9f3b975d-c44e-4015-bff8-80fbb7262e49.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=30673b94-bd36-4e6c-8130-1b537f889f6b</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,30673b94-bd36-4e6c-8130-1b537f889f6b.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,30673b94-bd36-4e6c-8130-1b537f889f6b.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=30673b94-bd36-4e6c-8130-1b537f889f6b</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">How come the System.IO.Path.Combine() method
   takes only two parameters? 
   <br /><br />
   Doesn't it makes a lot more sense to take <span style="font-family: Courier New; color: rgb(0, 0, 255);">(params
   string[] paths)</span> instead of <span style="font-family: Courier New; color: rgb(0, 0, 255);">(string
   path1, string path2)</span>? So that instead of <span style="font-family: Courier New; color: rgb(0, 0, 255);"><br /><br />
   Path.Combine(Path.Combine(rootPath, subFolder), "filename.txt")</span><br /><br />
   it's just<span style="font-family: Courier New; color: rgb(0, 0, 255);"><br /><br />
   Path.Combine(rootPath, subFolder, "filename.txt")</span>.<br /><br />
   Seems so obvious, I can't believe they made it like that for no reason. So what's
   the reason?<br /></body>
      <title>Combine() only two paths?</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,30673b94-bd36-4e6c-8130-1b537f889f6b.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,30673b94-bd36-4e6c-8130-1b537f889f6b.aspx</link>
      <pubDate>Mon, 18 Dec 2006 13:42:56 GMT</pubDate>
      <description>How come the System.IO.Path.Combine() method takes only two parameters? &lt;br&gt;
&lt;br&gt;
Doesn't it makes a lot more sense to take &lt;span style="font-family: Courier New; color: rgb(0, 0, 255);"&gt;(params
string[] paths)&lt;/span&gt; instead of &lt;span style="font-family: Courier New; color: rgb(0, 0, 255);"&gt;(string
path1, string path2)&lt;/span&gt;? So that instead of &lt;span style="font-family: Courier New; color: rgb(0, 0, 255);"&gt;
&lt;br&gt;
&lt;br&gt;
Path.Combine(Path.Combine(rootPath, subFolder), "filename.txt")&lt;/span&gt;
&lt;br&gt;
&lt;br&gt;
it's just&lt;span style="font-family: Courier New; color: rgb(0, 0, 255);"&gt;
&lt;br&gt;
&lt;br&gt;
Path.Combine(rootPath, subFolder, "filename.txt")&lt;/span&gt;.&lt;br&gt;
&lt;br&gt;
Seems so obvious, I can't believe they made it like that for no reason. So what's
the reason?&lt;br&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,30673b94-bd36-4e6c-8130-1b537f889f6b.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=7c73e615-b7cd-4043-86b2-addcc4585216</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,7c73e615-b7cd-4043-86b2-addcc4585216.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,7c73e615-b7cd-4043-86b2-addcc4585216.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7c73e615-b7cd-4043-86b2-addcc4585216</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div>
          <font face="Arial" size="2">
            <span class="265161916-06112006">- Nooo!</span>
          </font>
        </div>
        <div>
          <font face="Arial" size="2">
            <span class="265161916-06112006">
            </span>
          </font> 
   </div>
        <div>
          <font face="Arial" size="2">
            <span class="265161916-06112006">That was what startled
      me from my TV viewing. It was coming from my wife in the bathroom where our oneyearold
      had just run in. I thought no more of it. It's not like that's really unusual.</span>
          </font>
          <font face="Arial" size="2">
            <span class="265161916-06112006">
              <font face="Arial" size="2">
                <span class="265161916-06112006">
                  <img src="content/binary/innocent.jpg" align="right" border="0" />
                </span>
              </font>
            </span>
          </font>
        </div>
        <div>
          <font face="Arial" size="2">
            <span class="265161916-06112006">
            </span>
          </font> 
   </div>
        <div>
          <font face="Arial" size="2">
            <span class="265161916-06112006">
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">- Shit! Ohhh! My
         Goood!</span>
                </font>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font>
              </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font> 
      </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">Ok. This was beginning
         to sound like a bit more than nothing. What's the matter, I asked.</span>
                </font>
              </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font> 
      </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">- Shit! Your cellphone!
         He dropped it... </span>
                </font>
              </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font> 
      </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">Oh..</span>
                </font>
              </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font> 
      </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">- Into the bathwater!</span>
                </font>
              </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font> 
      </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">OH! Crap! I ran
         in there. She had already picked it up and was drying it off with a towel. And my
         son was just standing there watching the action like he was getting the answer to
         his question: </span>
                </font>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">"<em>I
         wonder what happens if...</em>". I was ready to throw the baby out with the bathwater,
         literally.<br /></span>
                </font>
              </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font> 
      </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">Luckily, the phone
         made it. It was completely soaked in soapwater and baby oil, but after drying it properly
         in front of the air conditioner it's been working just fine. </span>
                </font>
              </div>
              <div>
                <font face="Arial" size="2">
                  <span class="265161916-06112006">
                  </span>
                </font>
              </div>
            </span>
          </font>
        </div>
      </body>
      <title>Bathwater resistant</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,7c73e615-b7cd-4043-86b2-addcc4585216.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,7c73e615-b7cd-4043-86b2-addcc4585216.aspx</link>
      <pubDate>Thu, 23 Nov 2006 13:42:42 GMT</pubDate>
      <description>&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;- Nooo!&lt;/span&gt;&lt;/font&gt;
&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;That was what startled
   me from my TV viewing. It was coming from my wife in the bathroom where our oneyearold
   had just run in. I thought no more of it. It's not like that's really unusual.&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;img src="content/binary/innocent.jpg" align="right" border="0"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;
&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt; 
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;- Shit! Ohhh! My
      Goood!&lt;/span&gt;&lt;/font&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;Ok. This was beginning
      to sound like a bit more than nothing. What's the matter, I asked.&lt;/span&gt;&lt;/font&gt;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;- Shit! Your cellphone!
      He dropped it... &lt;/span&gt;&lt;/font&gt;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;Oh..&lt;/span&gt;&lt;/font&gt;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;- Into the bathwater!&lt;/span&gt;&lt;/font&gt;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;OH! Crap! I ran
      in there. She had already picked it up and was drying it off with a towel. And my
      son was just standing there watching the action like he was getting the answer to
      his question: &lt;/span&gt;&lt;/font&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;"&lt;em&gt;I
      wonder what happens if...&lt;/em&gt;". I was ready to throw the baby out with the bathwater,
      literally.&lt;br&gt;
      &lt;/span&gt;&lt;/font&gt;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;Luckily, the phone
      made it. It was completely soaked in soapwater and baby oil, but after drying it properly
      in front of the air conditioner it's been working just fine. &lt;/span&gt;&lt;/font&gt;
   &lt;/div&gt;
   &lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="265161916-06112006"&gt;&lt;/span&gt;&lt;/font&gt; 
   &lt;/div&gt;
   &lt;/span&gt;&lt;/font&gt;
&lt;/div&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,7c73e615-b7cd-4043-86b2-addcc4585216.aspx</comments>
      <category>Life</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=8cb75872-af75-4483-b488-0ae7d35e9db2</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,8cb75872-af75-4483-b488-0ae7d35e9db2.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,8cb75872-af75-4483-b488-0ae7d35e9db2.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8cb75872-af75-4483-b488-0ae7d35e9db2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">The excellent developer and my former schoolmate <a href="http://solheimweb.com/klog/">Bent
   André Solheim</a> just posted this <a href="http://solheimweb.com/klog/2006/11/guard-clauses-and-composed-methods_10.html">great
   blogpost</a> about two of my favorite refactoring techniques: Guard Clauses and Composed
   Methods. This is stuff that I can really recommend using. I've been using these techniques
   for a while and they really do make your code easy to read and maintain, and it has
   less bugs because of it. 
   <br /><br />
   I think the refactoring I use the most when working on legacy code is Rename. Proper
   naming of variables, methods and classes are the number one most important readability
   aid. Having lots of needless hungarian notation, abbreviations, or names that just
   mean nothing, adds noise and obfuscation.<br /><br />
   Second must be grouping together related blocks of logic within long methods and then
   using Extract Method to work towards Composed Methods. I often end up restructuring
   a lot before I can extract the methods because the code is tangled up in itself, like
   reuse of local variables (please, don't do that, and don't declare everything at the
   top of the method).<br /><br />
   Then it's reducing the levels of nesting by using Guard Clauses. And extracting methods
   often go hand in hand with this. If you have an if-statement and then a block of code
   after it that is to be executed regardless, then you can't make a guard that returns
   early from that method.<br /><br />
   public void DoWork(string a, string b)<br />
   {<br />
       // Handle the DoStuff first<br />
       if (a != null &amp;&amp; b != null)<br />
       {<br />
           if (a.StartsWith(b))<br />
           {<br />
              DoStuff(a, b);<br />
           }<br />
       }<br /><br />
       DoImportantThing();<br />
   }<br /><br />
   This if-statement can't be made a gaurd clause like it stands. But extracting that
   block to a method of its own cleans that up:<br /><br />
   public void DoWork(string a, string b)<br />
   {<br />
       HandleStuff(a, b);<br />
       DoImportantThing();<br />
   }<br /><br />
   private void HandleStuff(string a, string b)<br />
   {<br />
       if (a == null || b == null)<br />
          return;<br /><br />
       if (!a.StartsWith(b))<br />
          return;<br /><br />
       DoStuff(a, b);<br />
   }<br /><br /><p></p></body>
      <title>Refactorings</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,8cb75872-af75-4483-b488-0ae7d35e9db2.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,8cb75872-af75-4483-b488-0ae7d35e9db2.aspx</link>
      <pubDate>Wed, 15 Nov 2006 20:28:31 GMT</pubDate>
      <description>The excellent developer and my former schoolmate &lt;a href="http://solheimweb.com/klog/"&gt;Bent
André Solheim&lt;/a&gt; just posted this &lt;a href="http://solheimweb.com/klog/2006/11/guard-clauses-and-composed-methods_10.html"&gt;great
blogpost&lt;/a&gt; about two of my favorite refactoring techniques: Guard Clauses and Composed
Methods. This is stuff that I can really recommend using. I've been using these techniques
for a while and they really do make your code easy to read and maintain, and it has
less bugs because of it. 
&lt;br&gt;
&lt;br&gt;
I think the refactoring I use the most when working on legacy code is Rename. Proper
naming of variables, methods and classes are the number one most important readability
aid. Having lots of needless hungarian notation, abbreviations, or names that just
mean nothing, adds noise and obfuscation.&lt;br&gt;
&lt;br&gt;
Second must be grouping together related blocks of logic within long methods and then
using Extract Method to work towards Composed Methods. I often end up restructuring
a lot before I can extract the methods because the code is tangled up in itself, like
reuse of local variables (please, don't do that, and don't declare everything at the
top of the method).&lt;br&gt;
&lt;br&gt;
Then it's reducing the levels of nesting by using Guard Clauses. And extracting methods
often go hand in hand with this. If you have an if-statement and then a block of code
after it that is to be executed regardless, then you can't make a guard that returns
early from that method.&lt;br&gt;
&lt;br&gt;
public void DoWork(string a, string b)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Handle the DoStuff first&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (a != null &amp;amp;&amp;amp; b != null)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (a.StartsWith(b))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DoStuff(a, b);&lt;br&gt;
&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;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DoImportantThing();&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
This if-statement can't be made a gaurd clause like it stands. But extracting that
block to a method of its own cleans that up:&lt;br&gt;
&lt;br&gt;
public void DoWork(string a, string b)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; HandleStuff(a, b);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DoImportantThing();&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
private void HandleStuff(string a, string b)&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (a == null || b == null)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; return;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!a.StartsWith(b))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; return;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; DoStuff(a, b);&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,8cb75872-af75-4483-b488-0ae7d35e9db2.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=62b48447-37fa-46ae-811f-0ba77f321753</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,62b48447-37fa-46ae-811f-0ba77f321753.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,62b48447-37fa-46ae-811f-0ba77f321753.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=62b48447-37fa-46ae-811f-0ba77f321753</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Have you ever wanted to debug some .Net
   code that you have running in some other process that you just can't get into? I recently
   had the problem with Custom Actions in a Windows Installer. The custom action is a
   .Net Installer class that I wanted to debug. But I couldn't just attach the debugger
   to the running msiexec instance. It wouldn't hit my breakpoints.<br /><br />
   This is where the <font face="Courier New" color="#0000ff">System.Diagnostics.Debugger</font> class
   comes in real handy. It's got a method called <font face="Courier New" color="#0000ff">Launch()</font> that
   will tell Windows to open a debugger. You get this dialog box asking you if you want
   to debug the code, and what debugger to attach:<br /><br /><img src="content/binary/DebugAttach.JPG" border="0" /><br /><br />
   If you have Visual Studio up and running you can attach it. The debugger stops right
   at the Attach() method call just like if it was a breakpoint.<br /><br /><img src="http://www.bjornhaug.com/content/binary/DebuggerLaunch.JPG" border="0" /><br /><br /><br />
   By the way, as a sidenote to the custom actions, the custom action argument name that
   holds the virtual directory name in a Web Setup installer is [TARGETVDIR]. Took me
   some googling about to figure that out. Good info <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchusingcustomactionstomodifyinternetinformationserverduringdeployment.asp">here</a>.<br /></body>
      <title>Debugger.Launch()</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,62b48447-37fa-46ae-811f-0ba77f321753.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,62b48447-37fa-46ae-811f-0ba77f321753.aspx</link>
      <pubDate>Fri, 03 Nov 2006 13:43:47 GMT</pubDate>
      <description>Have you ever wanted to debug some .Net code that you have running in some other process that you just can't get into? I recently had the problem with Custom Actions in a Windows Installer. The custom action is a .Net Installer class that I wanted to debug. But I couldn't just attach the debugger to the running msiexec instance. It wouldn't hit my breakpoints.&lt;br&gt;
&lt;br&gt;
This is where the &lt;font face="Courier New" color=#0000ff&gt;System.Diagnostics.Debugger&lt;/font&gt; class
comes in real handy. It's got a method called &lt;font face="Courier New" color=#0000ff&gt;Launch()&lt;/font&gt; that
will tell Windows to open a debugger. You get this dialog box asking you if you want
to debug the code, and what debugger to attach:&lt;br&gt;
&lt;br&gt;
&lt;img src="content/binary/DebugAttach.JPG" border=0&gt;
&lt;br&gt;
&lt;br&gt;
If you have Visual Studio up and running you can attach it. The debugger stops right
at the Attach() method call just like if it was a breakpoint.&lt;br&gt;
&lt;br&gt;
&lt;img src="http://www.bjornhaug.com/content/binary/DebuggerLaunch.JPG" border=0&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
By the way, as a sidenote to the custom actions, the custom action argument name that
holds the virtual directory name in a Web Setup installer is [TARGETVDIR]. Took me
some googling about to figure that out. Good info &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchusingcustomactionstomodifyinternetinformationserverduringdeployment.asp"&gt;here&lt;/a&gt;.&lt;br&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,62b48447-37fa-46ae-811f-0ba77f321753.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=29eef9f8-2f9e-43a8-a56d-c0653e95a484</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,29eef9f8-2f9e-43a8-a56d-c0653e95a484.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,29eef9f8-2f9e-43a8-a56d-c0653e95a484.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=29eef9f8-2f9e-43a8-a56d-c0653e95a484</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I've often been thinking that, since HTML is a markup language that is marking the
      content with semantic meaning -- like, that some text is a &lt;p&gt;paragraph&lt;/p&gt; or
      a &lt;h1&gt;headline&lt;/h1&gt; -- that other types of semantic meaning
      should also be possible to mark up. but the set of tags available in HTML is quite
      limited.
   </p>
        <p>
      If, say, NNUG is publishing <a href="http://www.nnug.no/Avdelinger/Kristiansand/Moter2/Brukergruppemote-September/">info</a> on
      the next session that's scheduled for thursday in two weeks at HiA (the local college), they
      should be able to tag that date as a &lt;date&gt; and the location as a &lt;location&gt;.
      Like this:
   </p>
        <p>
          <strong>
            <font color="#808080">Next NNUG session will be on <br /></font>
          </strong>
          <strong>
            <font color="#808080">&lt;date utc="2006-10-12T17:15:00+01:00"&gt;thursday
      in two weeks&lt;/date&gt; <br />
      at &lt;location&gt;HiA&lt;/location&gt;. </font>
          </strong>
        </p>
        <p>
      This way my browser would be able to understand the date and perhaps show me a tooltip
      where it has translated it into my local timezone and display format. And it would
      be able to add that information to my calendar application just like a vCalendar file,
      and I would be notified half an hour before so I could actually get there on time
      and not come tip-toeing in in the middle of the session and wonder why they're not
      using the frikkin <a href="http://www.bjornhaug.com/PermaLink,guid,07ac27a2-7a60-4ebb-8c18-758ffe7d06d1.aspx">projector</a>.
      (Not that I use to be coming in late, I'm just making this up for effect, and they
      already have a .vcs file download for this).
   </p>
        <p>
      Well, it turns out this is already possible. Not by introducing new tags like that,
      because that's just silly, and your strict xhtml wouldn't validate anymore. (You could
      ignore that and go back to html 4, but then height=100% would be working like it should,
      and we can't have that, can we?). But rather by allowing you to assign semantic meaning
      to existing tags. This is what they're calling <a href="http://microformats.org/about/">microformats</a>.
      So with this, that NNUG session info can be read as a vCalendar entry by the
      browser. To make it work you just add some span, div, abbr or whatever tags you like
      around the specific fields, and then use classes on them to indicate the field
      types. Quite elegant, really. So now that session info can be written like this:
   </p>
        <p>
          <strong>
            <font color="#808080">&lt;span class="vevent"&gt;<br />
         &lt;span class="description"&gt;Next NNUG session&lt;/span&gt;<br />
         will be on &lt;abbr class="dtstart" title="2006-10-12T17:15:00+01:00"&gt;thursday
      in two weeks&lt;/span&gt; <br />
         at &lt;span class="location"&gt;HiA&lt;/span&gt;.<br />
      &lt;/span&gt;</font>
          </strong>
        </p>
        <p>
      With some <a href="http://blog.codeeg.com/tails-firefox-extension-03/">plugin</a> in
      your browser you can have it detect these microformats, and already a long <a href="http://microformats.org/wiki/implementations">list
      of services</a> are supporting them.
   </p>
        <p>
      If you want to style this with additional CSS classes, just list more than one class
      name in there separated by space. The only aber that I can see straight away
      is if you've already been using those class names for CSS styles, and now that
      description field looks really odd all of a sudden. Or you find you've got broken,
      unintended microformat definitions in your markup by accident. Plus the fact that
      everyone that's reading your fancy microformatted website needs to go and download
      that plugin before they get any use from it. But that'll change, soon, hopefully.
   </p>
      </body>
      <title>Microformats</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,29eef9f8-2f9e-43a8-a56d-c0653e95a484.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,29eef9f8-2f9e-43a8-a56d-c0653e95a484.aspx</link>
      <pubDate>Fri, 29 Sep 2006 22:15:09 GMT</pubDate>
      <description>&lt;p&gt;
   I've often been thinking that, since HTML is a markup language that is marking the
   content with semantic meaning -- like, that some text is a &amp;lt;p&amp;gt;paragraph&amp;lt;/p&amp;gt;&amp;nbsp;or
   a&amp;nbsp;&amp;lt;h1&amp;gt;headline&amp;lt;/h1&amp;gt;&amp;nbsp;-- that other types of semantic meaning
   should also be possible to mark up. but the set of tags available in HTML is quite
   limited.
&lt;/p&gt;
&lt;p&gt;
   If, say, NNUG is&amp;nbsp;publishing &lt;a href="http://www.nnug.no/Avdelinger/Kristiansand/Moter2/Brukergruppemote-September/"&gt;info&lt;/a&gt; on
   the next session that's scheduled for thursday in two weeks at HiA (the local college),&amp;nbsp;they
   should be able to tag that date as a &amp;lt;date&amp;gt; and the location as a &amp;lt;location&amp;gt;.
   Like this:
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;&lt;font color=#808080&gt;Next NNUG session will be on&amp;nbsp;&lt;br&gt;
   &lt;/font&gt;&lt;/strong&gt;&lt;strong&gt;&lt;font color=#808080&gt;&amp;lt;date utc="2006-10-12T17:15:00+01:00"&amp;gt;thursday
   in two weeks&amp;lt;/date&amp;gt;&amp;nbsp;&lt;br&gt;
   at &amp;lt;location&amp;gt;HiA&amp;lt;/location&amp;gt;. &lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   This way my browser would be able to understand the date and perhaps show me a tooltip
   where it has translated it into my local timezone and display format. And it would
   be able to add that information to my calendar application just like a vCalendar file,
   and I would be notified half an hour before so I could actually get there on time
   and not come tip-toeing in in the middle of the session and wonder why they're not
   using the frikkin &lt;a href="http://www.bjornhaug.com/PermaLink,guid,07ac27a2-7a60-4ebb-8c18-758ffe7d06d1.aspx"&gt;projector&lt;/a&gt;.
   (Not that I use to be coming in late, I'm just making this up for effect, and they
   already have a .vcs file download for this).
&lt;/p&gt;
&lt;p&gt;
   Well, it turns out this is already possible. Not by introducing new tags like that,
   because that's just silly, and your strict xhtml wouldn't validate anymore. (You could
   ignore that and go back to html 4, but then height=100% would be working like it should,
   and we can't have that, can we?). But rather by allowing you to assign semantic meaning
   to existing tags. This is what they're calling &lt;a href="http://microformats.org/about/"&gt;microformats&lt;/a&gt;.
   So with this, that&amp;nbsp;NNUG session info can be read as a vCalendar entry by the
   browser. To make it work you just add some span, div, abbr or whatever tags you like
   around the specific fields, and then use classes on them&amp;nbsp;to indicate the field
   types. Quite elegant, really. So now that session info can be written like this:
&lt;/p&gt;
&lt;p&gt;
   &lt;strong&gt;&lt;font color=#808080&gt;&amp;lt;span class="vevent"&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;span class="description"&amp;gt;Next NNUG session&amp;lt;/span&amp;gt;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;will be on &amp;lt;abbr class="dtstart" title="2006-10-12T17:15:00+01:00"&amp;gt;thursday
   in two weeks&amp;lt;/span&amp;gt;&amp;nbsp;&lt;br&gt;
   &amp;nbsp;&amp;nbsp;&amp;nbsp;at &amp;lt;span class="location"&amp;gt;HiA&amp;lt;/span&amp;gt;.&lt;br&gt;
   &amp;lt;/span&amp;gt;&lt;/font&gt;&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
   With some &lt;a href="http://blog.codeeg.com/tails-firefox-extension-03/"&gt;plugin&lt;/a&gt; in
   your browser you can have it detect these microformats, and already&amp;nbsp;a long&amp;nbsp;&lt;a href="http://microformats.org/wiki/implementations"&gt;list
   of services&lt;/a&gt; are supporting them.
&lt;/p&gt;
&lt;p&gt;
   If you want to style this with additional CSS classes, just list more than one class
   name in there separated by space.&amp;nbsp;The only aber that I can see straight away
   is if you've already been using those class names&amp;nbsp;for CSS styles, and now that
   description field looks really odd all of a sudden. Or you find you've got broken,
   unintended microformat definitions in your markup by accident. Plus the fact that
   everyone that's reading your fancy microformatted&amp;nbsp;website needs to go and download
   that plugin before they get any use from it. But that'll change, soon, hopefully.
&lt;/p&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,29eef9f8-2f9e-43a8-a56d-c0653e95a484.aspx</comments>
      <category>Software</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=ef7f1469-a05c-4e2d-86b8-65600ae52445</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,ef7f1469-a05c-4e2d-86b8-65600ae52445.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,ef7f1469-a05c-4e2d-86b8-65600ae52445.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ef7f1469-a05c-4e2d-86b8-65600ae52445</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      My friend <a href="http://fanms.com/">Sondre</a> is dreaming of <a href="http://www.home2030.com/">automating
      his house</a>. Having his basement filled with racks of servers and having sensors
      all over the place. He wants voice recognition to help him turn the lights on and
      off and control his music. His music will follow him from room to room by routing
      it to that room's set of integrated sound system, and doors will open as he approaches. 
   </p>
        <p>
      That's <em>kinda</em> cool. But really, if I was to spend a lot of money automating
      my house I'd want it to help me with the stuff I <em>don't </em>mind doing myself.
      I just don't think its too much hassle opening the door when leaving the room, or
      turning the lights on. And I actually enjoy putting on music manually. But if I could
      have my house <em>clean itself</em>, though, that would be another thing alltogether.
      Now we're talking actual <em>value</em>. 
   </p>
        <p>
      If it would constantly keep the toilets shining and pleasantly fragrant, the floors
      swept and toys out of harms way, keep stains off my rug, <a href="http://www.bjornhaug.com/PermaLink,guid,108E6E5B-5504-43EA-97FC-AE5776FE9730.aspx">ants</a> out
      of my kitchen, the waste basket empty, the lawn mowed, the fridge emptied of dated
      goods, the <a href="http://www.bjornhaug.com/PermaLink,guid,9C464B5F-0E50-48D1-8E25-3A620BBF968F.aspx">car</a> washed,
      my bills paid, my inbox free from spam, and dinner ready on time. Then I'd start doing
      the mortgage-math.
   </p>
        <p>
      "Computer! Lights on!", my ass. 
   </p>
        <p>
      "Bjorn, your car is washed now. Would you like it waxed as well?" - That's more like
      it!
   </p>
      </body>
      <title>Automated home</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,ef7f1469-a05c-4e2d-86b8-65600ae52445.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,ef7f1469-a05c-4e2d-86b8-65600ae52445.aspx</link>
      <pubDate>Fri, 29 Sep 2006 19:27:22 GMT</pubDate>
      <description>&lt;p&gt;
   My friend &lt;a href="http://fanms.com/"&gt;Sondre&lt;/a&gt; is dreaming of &lt;a href="http://www.home2030.com/"&gt;automating
   his house&lt;/a&gt;. Having his basement filled with racks of servers and having sensors
   all over the place. He wants voice recognition to help him turn the lights on and
   off and control his music. His music will follow him from room to room by routing
   it to that room's set of integrated sound system, and doors will open as he approaches. 
&lt;/p&gt;
&lt;p&gt;
   That's &lt;em&gt;kinda&lt;/em&gt; cool. But really, if I was to spend a lot of money automating
   my house I'd want it to help me with the stuff I &lt;em&gt;don't &lt;/em&gt;mind doing myself.
   I just don't think its too much hassle opening the door when leaving the room, or
   turning the lights on. And I actually enjoy putting on music manually. But if I could
   have my house &lt;em&gt;clean itself&lt;/em&gt;, though, that would be another thing alltogether.
   Now we're talking actual &lt;em&gt;value&lt;/em&gt;. 
&lt;/p&gt;
&lt;p&gt;
   If it would constantly keep the toilets shining and pleasantly fragrant, the floors
   swept and toys out of harms way, keep stains off my rug, &lt;a href="http://www.bjornhaug.com/PermaLink,guid,108E6E5B-5504-43EA-97FC-AE5776FE9730.aspx"&gt;ants&lt;/a&gt; out
   of my kitchen, the waste basket empty, the lawn mowed, the fridge emptied of dated
   goods, the &lt;a href="http://www.bjornhaug.com/PermaLink,guid,9C464B5F-0E50-48D1-8E25-3A620BBF968F.aspx"&gt;car&lt;/a&gt; washed,
   my bills paid, my inbox free from spam, and dinner ready on time. Then I'd start doing
   the mortgage-math.
&lt;/p&gt;
&lt;p&gt;
   "Computer! Lights on!", my ass. 
&lt;/p&gt;
&lt;p&gt;
   "Bjorn, your car is washed now. Would you like it waxed as well?" - That's more like
   it!
&lt;/p&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,ef7f1469-a05c-4e2d-86b8-65600ae52445.aspx</comments>
      <category>Geekery</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=07ac27a2-7a60-4ebb-8c18-758ffe7d06d1</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,07ac27a2-7a60-4ebb-8c18-758ffe7d06d1.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,07ac27a2-7a60-4ebb-8c18-758ffe7d06d1.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=07ac27a2-7a60-4ebb-8c18-758ffe7d06d1</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      I addended the local <a href="http://www.nnug.no/Avdelinger/Kristiansand/">.Net Users
      Group</a> the other day. It was a good session. Mostly for the social aspect as always,
      but the sessions were also quite interesting.
   </p>
        <p>
      But there was this one thing that got most of my attention: <em>How many .Net experts
      does it take to get a projector working?</em> There were two sessions; one
      mostly about fiddling with scrollbars on a too-low resolution projector, and one which
      turned out to be a live <em>podcast</em> with no picture at all.
   </p>
        <p>
      I guess that projector didn't like be used for non-Microsoft stuff, because
      that last session was about <a href="http://www.mono-project.com/Main_Page">Mono</a>.
      Luckily he was a good speaker so it turned out interesting anyway.
   </p>
        <p>
      (Does this say more about people, laptops or projectors? Seems to me this is always
      a problem. Why can't these things <em>just work</em>?)
   </p>
      </body>
      <title>Projector trouble</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,07ac27a2-7a60-4ebb-8c18-758ffe7d06d1.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,07ac27a2-7a60-4ebb-8c18-758ffe7d06d1.aspx</link>
      <pubDate>Fri, 29 Sep 2006 18:50:00 GMT</pubDate>
      <description>&lt;p&gt;
   I addended the local &lt;a href="http://www.nnug.no/Avdelinger/Kristiansand/"&gt;.Net Users
   Group&lt;/a&gt; the other day. It was a good session. Mostly for the social aspect as always,
   but the sessions were also quite interesting.
&lt;/p&gt;
&lt;p&gt;
   But there was this one thing that got most of my attention: &lt;em&gt;How many .Net experts
   does it take to&amp;nbsp;get a projector working?&lt;/em&gt;&amp;nbsp;There were two sessions; one
   mostly about fiddling with scrollbars on a too-low resolution projector, and one which
   turned out to be a live &lt;em&gt;podcast&lt;/em&gt; with no picture at all.
&lt;/p&gt;
&lt;p&gt;
   I guess that projector didn't like&amp;nbsp;be used for&amp;nbsp;non-Microsoft stuff, because
   that last session was about &lt;a href="http://www.mono-project.com/Main_Page"&gt;Mono&lt;/a&gt;.
   Luckily he was a good speaker so it turned out interesting anyway.
&lt;/p&gt;
&lt;p&gt;
   (Does this say more about people, laptops or projectors? Seems to me this is always
   a problem. Why can't these things &lt;em&gt;just work&lt;/em&gt;?)
&lt;/p&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,07ac27a2-7a60-4ebb-8c18-758ffe7d06d1.aspx</comments>
      <category>Life;Software</category>
    </item>
    <item>
      <trackback:ping>http://www.bjornhaug.com/Trackback.aspx?guid=b72f67af-0760-4861-b561-20beea96e6e4</trackback:ping>
      <pingback:server>http://www.bjornhaug.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.bjornhaug.com/PermaLink,guid,b72f67af-0760-4861-b561-20beea96e6e4.aspx</pingback:target>
      <dc:creator>behaug@gmail.com (Bjorn Erik Haug)</dc:creator>
      <wfw:comment>http://www.bjornhaug.com/CommentView,guid,b72f67af-0760-4861-b561-20beea96e6e4.aspx</wfw:comment>
      <wfw:commentRss>http://www.bjornhaug.com/SyndicationService.asmx/GetEntryCommentsRss?guid=b72f67af-0760-4861-b561-20beea96e6e4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      Refactoring in Visual Studio 2005 with Web projects is incredibly slow. <a href="http://weblogs.asp.net/scottgu/archive/2006/01/02/434355.aspx">This</a> helps
      alot!
   </p>
      </body>
      <title>Web project refactoring</title>
      <guid>http://www.bjornhaug.com/PermaLink,guid,b72f67af-0760-4861-b561-20beea96e6e4.aspx</guid>
      <link>http://www.bjornhaug.com/PermaLink,guid,b72f67af-0760-4861-b561-20beea96e6e4.aspx</link>
      <pubDate>Thu, 14 Sep 2006 14:49:56 GMT</pubDate>
      <description>&lt;p&gt;
   Refactoring in Visual Studio 2005 with Web projects is incredibly slow. &lt;a href="http://weblogs.asp.net/scottgu/archive/2006/01/02/434355.aspx"&gt;This&lt;/a&gt; helps
   alot!
&lt;/p&gt;</description>
      <comments>http://www.bjornhaug.com/CommentView,guid,b72f67af-0760-4861-b561-20beea96e6e4.aspx</comments>
      <category>Software</category>
    </item>
  </channel>
</rss>