Home
About
Contact
Thursday, May 29, 2008

pdc2008 The PDC web site is up! At the time of writing it's 151 days, 3 hours and 25 minutes to the conference start :-) Anyway, if you live in the US you've probably bought a ticket already. If you don't and are lucky enough to have a budget big enough to travel to the US, PDC is something to consider. My impression of PDC compared to TechEd is that you'll get to know what's coming, as apposed to TechEd where you get to know what's already there. I would love to go, but I'm afraid I've spent most of my budget and are left with buying books only :-) I'm going to NDC2008 though, which will be a great event as well.

Thursday, May 29, 2008 10:41:21 AM (W. Europe Daylight Time, UTC+02:00)
Tuesday, May 27, 2008

Brian Harry over at the TFS team has a great post about the new features that will be available in the coming SP1 for TFS 2008.

Tuesday, May 27, 2008 7:47:50 AM (W. Europe Daylight Time, UTC+02:00)
Saturday, May 24, 2008
FIT

Lately I've been trying to focus on how to make testing work better at our company. We've fully integrated our testers into the Scrum teams, but there's still some things I feel is missing. Especially related to the tools/frameworks we use for testing. One of the things I'm looking into is Fit and FitNesse (Framework for Integrated Test) created by Ward Cunningham in 2002. The first time I got an introduction to Fit was in Nils Christian Haugen's presentation at JavaBin back in March. This got me very excited, but I've hadn't had time to look enough into it, but now I think I will.

fit In essence Fit is a framework that lets your user stories's story tests (or acceptance tests) to be automatically tested/verified. The way you do this is by using a table structure (as showed on the left) to give in values and expected outcome. This is a very nice way of working with tests from a customer perspective. Everyone can understand this by having a short introduction to how it works.

Much like you do with unit tests, this process is automated. The preferred way of authoring unit tests is by using Test Driven Development (TDD). Similarly, working with Fit you can use Story Test-Driven Development (STDD). I really find this way of working to be very interesting and I hope to try this out live soon. Hopefully I can post some more articles on this later when I have some actual experience with it :-)

David Hussman does a great job describing Fit in his presentation.

Saturday, May 24, 2008 11:33:35 PM (W. Europe Daylight Time, UTC+02:00)

Pex Earlier this month Fredrik Normén wrote a post about argument validation. Yesterday Rune Grothaug from MS Norway posted a link to a new tool MS has developed in their research lab called Pex (Program EXploration). Combining these two (argument validation and Pex) have to be a perfect match.

.Net | Testing | Tools
Saturday, May 24, 2008 11:31:09 PM (W. Europe Daylight Time, UTC+02:00)
Tuesday, May 20, 2008

PS! This article is about Norwegian wireless broadband's, but you might find similar solutions in your country.

ICElogo A couple of years ago I considered buying a subscription for a wireless broadband from ICE to use when I was out traveling or at our lodge. ICE uses the old mobile network in Norway (NMT 450) at 450 MHz which had and still has a great mobile coverage in Norway (though not used for mobile phones anymore). This network has a max down speed of 3,1 Mit/s and upload of 1,8 Mbit/s. However, at the time the subscription was too expensive (around 400kr/$80/£50) per month. It was not an option to have both a fixed broadband at home and the wireless subscription on top of that. Recently though they have started to offer a different subscription based on usage. Or actually it's a subscription where you pay for one week at the time, which is more attractive but still quite expensive if you're just using it in the weekends. However, having this as an option to get on the Internet when you absolutely have to is of great value. DinSide.no has an article about ICE.

Telenor Another company offering a similar concept is Telenor. Telenor offer wireless through normal GSM network (EDGE/3G/Turbo-3G). They has several subscription options from monthly, weekend to just usage. You can find more info here. There's also a test by DinSide.no here.

 

NetCom A third company (NetCom) also provide this service. Their subscription services is very similar to Telenor's, except they don't offer usage only.

 

Common for all of these is that you'll need a USB modem that your provider will provide as part of your subscription. Some providers let you use your mobile phone or your PC modem with a SIM card instead.

Tuesday, May 20, 2008 11:02:19 PM (W. Europe Daylight Time, UTC+02:00)
Tuesday, May 13, 2008

Update: This article is not limited to deploying applications to Vista, but also when changing files that are only writeable by administrators (e.g. files in the Program Files directory).

If you have not made specific changes to your installation to support UAC in Vista, this is for you. I hope this will help others to not spend many days of confusion, desperation and sleepless nights like I have.

Lately I've been getting reports from some of my coworkers running Windows Vista that the app.config file in our application was not updated after installation. I've also experienced this myself. We've solved them without knowing exactly how (which I hate). Typically "I uninstalled the application and installed to a different location, and it worked!" Well, this is a workaround that are not particulary popular to any of our customers, so I dived into the problem to find the exact reason.

To save you some reading I'll just say that the reason and solution is to provide your application with a manifest file to handle UAC in Vista as described in this article: Create and Embed an Application Manifest (UAC) I haven't actually tried this out yet, but I trust the article to be correct :-)

Virtualization
But that's not the interesting part. The interesting part is what happens (or what can happen) if you don't have an application manifest for this purpose? If your superstitious you might think that something weird is going on with your computer. If you're like me you KNOW that something weird is going on with your computer, and you need to find it and fix it. The weird thing is Vista virtualization.

"File virtualization addresses the situation where an application relies on the ability to store a file, such as a configuration file, in a system location typically writeable only by administrators"

"Virtualization is implemented to improve application compatibility problems for applications running as a standard user on Windows Vista."

As I write this I have exactly this problem on my computer. I've installed our application (Contiki ECM) to this location: C:\Program Files\CMA Contiki AS\Contiki ECM\. This is where I've always install our app. So today I installed and checked that the app.config was updated with all my changes done during installation. And it hadn't. Actually it was updated, but not with my changes. It looked like an old file that I had some time ago. How could this happen?

Textpad .vs. Notepad
To make this even more confusing, I discovered this reading the file in TextPad, but when opening the file in Notepad it was fine. All my changes was there! So I thought that this was a TextPad problem. I started our application, but it turns out that when .Net tries to read the config file, it reads the same old stuff as TextPad did, resulting in old config to be loaded into our app. Why does Notepad get the right file? I don't know. Please tell me if you do.

The solution
So after Googling for a while I found this article on MSDN, and things started to make sense. But first let me show you what it looks like on my computer. The file causing my headaches are Contiki.Windows.Application.exe.config.

VistaUNCImg1 
Do you see when it's modified? 08:56 this morning, but the file that is being opened is from 13th of April! How do I know? Well, if you have a look at the virtualized files which you'll find in C:\Users\Username\AppData\Local\VirtualStore\[Your path], it might help out. So I looked at C:\Users\1jontor\AppData\Local\VirtualStore\Program Files\CMA Contiki AS\Contiki ECM and found this:

VistaUNCImg2 
Modified back in April. I opened this file and it was exactly what I saw in TextPad. But this file is the same both in TextPad and Notepad! :-)

Explorer gives you a shortcut to the Virtual Store folder if any files are virtualized, and will show this button in Explorer:

VistaUNCImg3

The end
A couple of notes from the MSDN article:

"When you enumerate resources in folders and in the registry, Windows Vista will merge global file/folder and registry keys into a single list. In this merged view, the global (protected) resource is listed along with the virtualized resource."

"The virtual copy will always be present to the application first.... even if [some file] is updated"

Even if the file is updated!? Who though of that? Was that really such a good idea? I can see what they where thinking, but it would have saved me a lot of work getting an error message saying "Access denied"...

To end this off I picked another good quote from the article:

"Microsoft intends to remove virtualization from future versions of the Windows operating system as more applications are migrated to Windows Vista."

I appreciate that... :-)

Tuesday, May 13, 2008 10:08:42 PM (W. Europe Daylight Time, UTC+02:00)
Wednesday, May 07, 2008

Today I was struggling to figure out why I kept getting this error message when downloading a ClickOnce app:

The file 'C:\Documents and Settings\[user]\Local Settings\Temp\2\Deployment\RCAX3K4W.T8E\GRY27V4Q.GBE\SomeDll.dll' already exists.

First, let me just say that I don't use Visual Studio to create the ClickOnce deployment, but the Mage.exe utility. If you use Visual Studio this problem will be solved on Publish in Visual Studio.

I knew there was only one of this dll present on the server where ClickOnce downloads its files, but still it insisted that it was already downloaded. I checked my application manifest and there where only one entry for my dll. The dll causing this problem is a COM dll with generated manifest files (Reg-Free COM) as described here.

I started to inspect the Reg-Free COM manifest file generated by Visual Studio. It turns out that this manifest file use the same syntax as ClickOnce, or actually ClickOnce use the existing manifest schema that was introduced with Windows XP and Reg-Free COM. So in my ClickOnce manifest I had this:

...
<file name="My.dll" size="1121280">
  <hash>
    <dsig:Transforms>
      <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
    </dsig:Transforms>
    <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
    <dsig:DigestValue>UwpS1EpkD7aJk3uWdOtX+3BHiOA=</dsig:DigestValue>
  </hash>
</file>
...

...and in my Reg-Free COM manifest I had this:

...
<file name="My.dll" asmv2:size="1121280">
    <hash xmlns="urn:schemas-microsoft-com:asm.v2">
      <dsig:Transforms>
        <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
      </dsig:Transforms>
      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
      <dsig:DigestValue>UwpS1EpkD7aJk3uWdOtX+3BHiOA=</dsig:DigestValue>
    </hash>
    <typelib tlbid="{2d5e2d34-bed5-4b9f-9793-a31e26e6806e}" version="4.1" helpdir="" resourceid="0" flags="HASDISKIMAGE" />
    ...COM Registry Entries...
</file>
...

It's exactly the same as ClickOnce except from the <typelib> part which is used by Reg-Free COM. ClickOnce treated this as any other ClickOnce manifest, and correctly stated that the file is about to be downloaded twice. The surprising part for me though was that the Reg-Free COM manifest was read at all. Since the deployment manifest is only linked to the application manifest...

So what's the solution? Just delete the file entry in the ClickOnce manifest and re-sign it! Deleting can be done like this:

ApplicationManifest manifest = (ApplicationManifest) ManifestReader.ReadManifest("ApplicationManifest", @"My.exe.manifest", false);
FileReference fileRef = manifest.FileReferences.FindTargetPath("My.dll");
manifest.FileReferences.Remove(fileRef);
ManifestWriter.WriteManifest(manifest);

Curious about how Visual Studio solves this? It merges all the manifest files into the application manifest and use the imported manifest entries instead (or something like that). At least that happened when I created a sample program to test this.

Wednesday, May 07, 2008 12:05:41 AM (W. Europe Daylight Time, UTC+02:00)
RSS RSS - Comments Twitter LinkedIn
         
SEARCH
 
 
         
TOP POSTS
   
         
NAVIGATION
   
         
CATEGORIES
  .Net (61) ADFS (3) Agile (30) Ajax (5) Architecture (20) Articles (1) ASP.NET (6) ASP.NET-MVC (1) Blogging (12) Books (2) BPEL (1) CleanCode (1) CloudComputing (7) Community (4) CSharp (11) DasBlog (5) Database (2) DDD (5) Deployment (16) DSL (1) Events (38) ExtremeProgramming (6) Fun (6) Gadgets (4) IIS (10) InfoQ (4) Java (2) Lean (3) Linq (2) MemoryLeaks (5) Microsoft (37) MVC (1) NDC (2) NNUG (36) Other (10) Patterns (9) Performance (3) Scrum (17) Security (7) ServiceBus (1) Silverlight (4) Software (19) TeamManagement (11) TechEd (7) Testing (4) Tools (25) TvGuide (1) WCF (8) Web (15) WebDeploy (1) WIF (3) Windows (10) Vista (15) VisualStudio (16) WiX (9) Work (16) Workflow (3)  
         
ARCHIVE
   
         
BLOGROLL
   
         
ON THIS PAGE...
 
PDC2008
New features in TFS2008 SP1
FIT
Pex: Automated Exploratory Testing for .Net
Real wireless broadband
Are you deploying applications to Windows Vista, and doing ok?
Problem with Reg-Free COM and ClickOnce