Ok, so I have been wrestling for the last few days with the fact that I was unable to debug .NET addins in Outlook. For whatever reason, Visual Studio would launch Outlook, and then it would crash almost immediately. I started to think that this might be a permissions issue. With that in mind, I broke out FileMon and RegMon from SysInternals.

RegMon turned up nothing, but FileMon did the trick. Just before Outlook crashed, it loaded v2.0.40301 (Whidbey) libraries, and what looked as if maybe even the Whidbey CLR. Anyhow, what I did was add an OUTLOOK.EXE.config file (yes, you can do that), with the following:

<configuration>
   <startup>
      <supportedRuntime version=”v1.1.4322″/>
      <supportedRuntime version=”v1.0.3705″/>
   </startup>
</configuration>

Well, sure as the sun rises in the East, it worked. By the way, the reason why I knew that this could be done was because I saw the runtime in FileMon look for this file, so I new the usual rules for config files applied even when the CLR is hosted in a non-managed application such as Outlook.

Oh the other thing that is the real problem is that I uninstalled the Whidbey preview, but it appears as if most, if not all, of the version 2 framework components are still there, and active none the less. I attempted to search Google for some idea on how to rid my system of verson 2, but to no avail. Anyway, as soon as XP SP2 goes RTM, I’m going to reinstall XP fresh.

I can now officially say that the DataSet can kiss my lilly white ass! I have just successfully data bound a custom collection that contains objects that have a property containing another collection. All collection classes derive from CollectionBase, and implements IBindingList. The individual objects implement IEditableObject. This also now makes the design pattern I’m using ready for primetime.

I wasn’t sure how I was going to handle DataBinding in WinForms apps w/o a DataSet. Guess what? I can. Anyway, I followed this example at MSDN, Windows Forms Data Binding and Objects. It’s a caugh VB.NET caugh example, but I was able to extrapolate what I needed.

The only thing left was how to setup the DataGrid. I set the DataSource to the parent object collection:

ABADataGrid.DataSource = banks;
ABADataGrid.DataMember = "ABAs";

and the DataMember is the property name on a individual parent object, Bank, that contains the collection of child elements. This wound up working like a charm. The hierarchy is as follows:

Banks
+---Bank
    +---ABAs
        +---ABA

Some other resources consulted where:

HOWTO: implement IBindingList in Winforms
HOWTO: implement IListSource in Winforms v2

So, needless to say, I’m quite happy. See ya later DataSet!

[Listening to: andromeda]

I have been (re)working the Time Tracker sample app for some time now. I want to move the app to a WinForms app and I have been looking at the TaskVision sample app for ideas. I personally do not care for its use of web services, and I am partial to remoting. I also want to make use of the Microsoft Data Access Application Block.

I was wondering if anyone had a good sample of a solid UI/Business Rules/Data Access n-tier architecture that makes use of the app block and is in use in a WinForms app. Thanks.

[Listening to: pink the south beach mix.mp3 – ]

The public interface of my ISA Server is configured for DHCP. It is in turn attached to a cable modem. The problem that this presents is that the cable provider could change the DNS server addies, and the caching-only DNS server installed on the ISA Server would no longer have correct addresses for its forwarders.

The solution I implemented is to dynamically update the forwarder addie whenever there is a lease expiration on the public interface. I achieve this using two tools. The first tool is William Levra-Juillet’ s DirectUpdate. The second app is a custom C# app that I wrote.

DirectUpdate serves two functions. First and formost, it updates dyndns.org with the public IP addie of the ISA Server. The second responsibility that it has it launch my custom app. DirectUpdate has the ability to start a script/console app when it detects a change. Therefore, I have directed it to call my app.

The function my app has it update the DNS forwarder addies with the ones assigned from the cable provider. The is achieved utilizing WMI (which is Microsoft’s implementation of WBEM). The app first loops through each interface on the ISA Server until it reached the interface that is configured for DHCP. Then it reads the DNS addies from the interface. The second step is to again use WMI to connect to the DNS server running locally and update its forwarder addies.

My custom app can be found here, along with some setup info.

[Listening to: 05-ritual-nous sommes du soleil.mp3 ]