But it works on my PC!

The random thoughts of Richard Fennell on technology and software development

Virtual Server and MAC addresses

Today I had to do some work on an old VB6 system, a development environment I do not have on my Vista laptop.

So I copied a Virtual PC image I had with most of the tools I needed and ran it on one of our Virtual Servers. As this VPC needed to run at the same time as the VPC I copied it from, I ran NewSid to change the SID and the PC names.

All seemed good until I tried to use the network, both within our LAN and the Internet it was very intermittent, but I saw no errors.

To cut a long story short the problem was I had two VPC images with the same MAC address. Once I stopped the new VPC, changed the MAC address and restarted it all was fine.

So the Technical Tip is - if you copy a VPC image you need to run NewSID and manually alter the MAC address to avoid network clashes

The day after DDD6

Got back from DDD6 late last night after our 5am start. After what seemed a short nights sleep I got up to do the Abbey Dash 10K in Leeds this morning with 6000 other runners, posting a 47 minute time, which I suppose is OK given the complete lack training of late due to conferences of late and I was hampered by tripping over some wire left in the road near the start and cutting my knee open!

This morning exertions gave me some time to reflect on the previous days events. Firstly my session on Scrum; it seemed to go OK other than I overran a little and had to rush through the demo of eScrum. You can get the slides from the Black Marble web site (and soon on the DDD site I guess). I have added some screen shots and notes from the shorten demo. I was asked a couple of questions that I said I would post information on:

Unusually, I actually managed to get the three other sessions at this DDD, rare when I am speaking. They were all excellent:

  • My favourite Patterns with Gary Short - the clearest session on patterns I have seen.
  • Why do I need an Inversion of Control Container? with Mike Hadlow - A nice follow up to the patterns session giving a great real world way to take advantage of Inversion of Control using the Castle Windsor Container 
  • Testing Your Applications With MbUnit Gallio with Ben Hall  - I have been using an unholy mixture of nUnit and MSTest, after this session I have to take a long hard look at MbUnit.

Maybe it is the trend of 2007 or a sign the industry is maturing that all three of the conferences I have been to recently have focused on best practice. I consider this a really good sign.

Anyway another great DDD, thanks to the committee for all their work putting it on. Looking forward to the growing franchise in 2008.


Technorati Tags:

Interesting change to TFS licensing

Just seen a post on Brian Harry's blog that the license has been changed for TFS. You no longer need a CAL for all users who connect to the TFS server, a special case of users has been created, those who can create work items, but do little else. You now have an unlimited number of theses as standard.

Why is this good? it means you can have anyone in a company connect to the TFS server to log bugs or change requests. Previously to do this means you bought a lot of CALs, or very naughtily ignored he license, so this is good sensible move.

System Security

While I was presenting yesterday at the second of Black Marble's events on Windows 2008 to a group of IT professionals, I suggested that they look at 'Writing Secure Code' by Michael Howard and David LeBlanc to get a good view of security in depth and risk analysis. On second thoughts, this book might be a bit too developer focused. I think Michael Howard's new book with Steve Lipner "The Security Development Lifecycle" might be a bit more appropriate read (though it does not seem to be available on Amazon UK yet, should be there soon).

Fun with a DDD6 demo

I have been working on my DDD6 demo, I intend to show eScrum at end of my session on Scrum. I thought I would use the VPC I had from DDD5, this was based on the TFS Orcas Beta1 and had all the tools I wanted configured. To get some more realistic data in the reports I wanted to leave TFS server running for a week and on a daily basis update the work items as if the project was progressing.

The problem was the underlying operating system evaluation license expired at the start of November. So I tried:

  • a Windows 2K3R2 disk and did an in-place upgrade with a valid key, this seemed to work but when I tried to run any ASP.NET it failed, basically all the rights seemed to be lost
  • tied to force the system to ask for a new key using the KB328874 procedure - this does not work on Windows 2003, just XP it seems, though some web sites seem to say it does work.
  • did a SYSPREP on the server, this allowed me to enter a new key, but after 1 hour I still got the evaluation period expired message - it seems you have to use new media to removed the evaluation time bomb.

So I gave up on that and tried the Visual Studio 2008 TFS Beta2 VPC download. Now installing eScrum on this is not really supported. You have to also install the 2005 Team Foundation Client and some Ajax bits as well as manually replace the SharePoint template using the one provided by John Powell. All seemed good until I tried to add a product backlog item to the sprint on the sprint details page in eScrum where I got loads of JavaScript errors - my guess is some thing was not registered right. Interestingly my 'live' eScrum, which has been in place upgraded to the Beta2 seems to work OK. Basically I gave up on this VPC, I will wait for a release of eScrum that supports VS2008 for new installs.

So this left me back at a fully working Beta1 VPC that was on an expired OS, or the option to installed a complete new system using VS2005 with 'real' licenses, from scratch.

But then I thought about what 'expired' means for a Windows 2003 evaluation install; it means after 1hr you get a  message the server has expired, and an hour later it restarts. Now this is not much use for any real application, but does all I needed, so I could have saved a good deal of messing around over the past couple of days!

I was still a little worried that the bi-hourly resets may mean the timed jobs that keep the TFS data warehouse up to date might not occur, so I also installed the tool by Eric Lee to allow the update process to be triggered whenever I needed it

So hopefully I now have a system I can build a reasonable demo data set on over days up to DDD6.

Updating an Ajax Application

Our home grown work tracking system has been through many versions over the years. The current incarnation was using a pre-release version of the Microsoft AJAX extensions. Now this caused a problem when we moved the ASP.NET application to a newly rebuilt IIS server with the 1.0 release version of AJAX.

We were getting errors that the correct System.Web.Extensions DLL could not be found, as you would expect. I rebuilt the application using Visual Studio 2005 with the AJAX 1.0 Release installed, and published this build. I tried to load the application and the browser went into a tight loop, not what I expected. I checked the server event log and found the issue was that in the published web.config file there was a reference to a Crystal Reports DLL (which we have not used for years). Once I removed this reference from the web.confg the site worked perfectly.

So the tip: look out of old long forgotten assembly declaration in ASP.NET applications, if you change a technology (as we did from Crystal Reports to Microsoft Reporting Services) make sure you removed the references, even if the old DLLs are on your servers. They will tend to bite you on an upgrade.

Addendum (written a couple of days later)

On reading this might have thought 'he is not using a very good code release model', but I actually have been using the Visual Studio Publish tool. I publish to a local directory then upload these files via FTP to the remote hosting site, replacing all files on a software publish. So in theory if I have removed a reference to an old DLL in Visual Studio then it should also be removed in the re-published site.

Now this appears not to be the case, I can find no reference to Crystal Reports in my solution, but on each publish it reappears. How strange, I will post again if I find out why.

Addendum 2

Found it, a bit of a user too stupid error really! The problem was not a stray reference but an extra <httpHandlers> entry. This goes some way to explaining why we did not get a could not load assembly error. As during the page we could not loaded the correct httpHandler it tried to go to the error page, which in turn could not load the handler etc. etc. etc.

Again it shows you cannot always trust an IDE to clean up a project files if you change technology.

When you think it cannot get worse...

... you end up presenting at TechEd.

Yesterday was fun (of a sort) I ended up doing the demo section of the ESB Guidance session at TechEd. This session was scheduled to be done by Robert Hogg (Black Marble) and Ewan Fairweather (Microsoft) but Ewan had to fly home early unexpectedly on Friday morning, so leaving somewhat of a gap.

So you say, 'that is not too bad you just step in and do the prepared and scripted demo'. Well in a perfect world you would, but about 6 hours before our session was on the formal release of  ESB 1.0 was posted to the MSDN site. As our demo was based on a CTP build, and as we knew the final release was somewhat different, we thought it only right to at least show the new documentation and file structures. So a hectic few hours were had by all.

I hope anyone attended the session go what they wanted out to if. I had to leave for my flight soon after the session so have heard no feedback other than the people who came to chat at the end of the session, who seemed happy. I am sure Robert will know more when he gets back, as his flight was later he had time to return to the olympian heights of the speaker lounge to once more feast upon unicorn steaks and ambrosia (well get coffee in a proper cup not a paper one at least).

As I made the mistake of not changing my TechEd speakers shirt before the flight home, not realizing the shirt made me look like a member of EasyJet staff, my outstanding question is - is there any future event in my life where the lovely grey/blue with orange trim TechEd speakers shirt is appropriate wear?

TechEd Barcelona - update

I have not been blogging much from here have I, it is not that the sessions are not that interesting, but no single item has been giving me an huge urge to write.

As I said in my last post I think this is a conference of best practice ideas and as such you tend to pick up a useful nugget here and there which you store away for future use. This is particularity relevant as at present I am reviewing our engineering process to improve our software development life cycle.

Like many companies we use a variety of tools beyond Visual Studio such as CruiseControl, nUnit and our own home grown work tracking system. I have to consider when it is advantageous to swap these for the new features in Visual Studio Team System 2008. Being pragmatic this is always going to be a slow migration, these is little point investing time in moving an old project that barely still under maintenance to a new system. In fact I have chosen to only move our active projects from our old SourceSafe based system to TFS at a major release point, e.g. V1 to V2, snap-shoting it at this point and not bothering to bring over all the change history.

The tools round the edge is another question. If you, as we do, have an investment in nUnit and CruiseControl for projects is there any good case to rework everything to MSTEST and TFS Build? In the long term I think the answer is yes, to get a unified end to end solution, but it is hard to justify the time to do an 'instant' swap over, so again it will be slow move. Especially when you can use a combined system e.g. have old testing nUnit and new ones in MSTEST pulling it all together with CruiseControl which can happily access the TFS SCC, build using MSBUILD and run all the testing frameworks.


Anyway Roy Osherove is tuning up his guitar for a session on testing to time to go....

No sizzle and not much sausage

The keynote at TechEd was as expected, we all knew about the impending release  of VS2008, and still no fixed date yet (so no sausage there) and not really anything announced product wise that was not already in the blog sphere (so no real sizzle).

I think this is going to be conference on delivering on last years promises; how to get the best from the tools and technology announced last year, now that they are now really production ready and the early adopters have had a year to play with them.

My suggestion to all attendees - check the sessions with the real world experience. Due to the CTP and beta programs, there are some real experts out there on these products and many of them are presenting here (or in the audiences at the number interactive sessions).