Two Down: Exam 70-536 – .NET 2.0 App Development Foundation

While the blog has been silent over the last couple of months, I’ve been preparing for and taking more certification exams.  That amidst never-ending yard and house work in this unusually dry, hot summer.

A couple of weeks back, I took the 70-536 exam and walked away with a score of 895.  Disappointing (yes, all things are relative) because I got 100% on the sections that should have been the hardest for me and missed questions on “easier” sections.  However, a lot always depends on how they phrase the questions and how much you read into them.  This was no better than any of the past MS exams in that regard.

I’m now certified as an MCTS: .NET Framework 2.0 Distributed Applications.  Could they make these titles any longer?  My end goal is MCPD, which requires three more exams (argh).

The majority of the 45-question, 2-hr max test was code questions where you have four or five code samples from which to choose.  There were also “choose and order” questions where you have 6-7 actions and you have to pick just the ones you need and put them in the right order.

None of the exam prep books were available when I prepared for this test, and the scope of this exam is so large that I resorted to simply reading the MSDN class library documentation.  I went through each class in the exam prep list, looked it up and read the docs.  Yes, it was every bit as painful as it sounds.  I used the MeasureUp practice test after I had read through everything.

The official MS Press prep book is finally available, with another non-Microsoft book supposedly coming soon.  Here’s the exam prep guide.

Use MSBuild with .NET 1.1

As most of you probably know, MSBuild is the new XML-driven build tool provided with .NET Framework 2.0.  You do not need to install Visual Studio 2005 to get and use MSBuild.  I’ll never understand why Microsoft went away from nmake and make files when they moved to Visual Studio .NET from the old C/C++ compilers.  It was a big design mistake and one that has made it difficult to create automated builds or build scripts of any significant complexity.  Thankfully they finally decided to clone nAnt and give us a real build tool again.

In any case, the real point of this post is that .NET 1.1 projects have just as much, if not more, to gain from MSBuild as .NET 2.0 projects do, and that has just become much easier.  The “MSBuild Extras – Toolkit for .NET 1.1” is now available.  If you’ve been using nAnt, this is a great way to prepare for .NET 2.0 and take advantage of MSBuild’s power today.

Also of interest, you’ll find that the download for this toolkit is on a Microsoft site called CodePlex, stated to be “Microsoft’s community development” site.  I’m not quite what this means to GotDotNet, which has filled exactly that role for many years now.  Perhaps Microsoft is hoping to create their own SourceForge in CodePlex.  It will be interesting to see how it is ultimately used, but it seems to be picking up a bunch of interesting projects.

About the SQL Server 2005 Post-SP1 Cumulative Rollup

If you’re ready to install SQL Server 2005 SP1, you should also be aware of the recently-released cumulative hotfix package (build 2153).  Unfortunately, Microsoft has created an unusual situation that is bound to lead to confusion.

SQL Server 2005 SP1 was released less than a month ago, yet we already have a post-SP1 hotfix package that includes a significant number of additional fixes (33+).  There are two things that stand out with this release.

First, the update files are available for public download, whereas in normal practice the article describes the fixes and says “contact PSS to obtain this update.”  Second, the article does not contain the usual disclaimer of “install this update only if you are experiencing the problem described.”  However, it also notably lacks a statement recommending its installation.  As a result, there is neither a negative nor a positive statement about whether it should be widely installed.

So what do you do?  My recommendation is to always install SP1 and this cumulative update package together (and in that order).

As I had suspected, this odd timing was just a result of Microsoft’s release schedule, and the updates in this rollup didn’t quite make the SP1 cutoff.  You don’t need to take my word for it — Euan Garden of the SQL Server product team anticipated the confusion.

How to install?  This should go without saying, but it’s worth the time to back up your databases first, including the master and msdb databases, and to install these updates on a test server before updating your production server.  Install SP1 first, reboot if required, then install the cumulative update and read the directions first.  This update comes in six separate files that must be installed in a specific order, namely, the top-to-bottom order in which they are listed in the KB article.

Microsoft’s Marketing Missteps. Will They Never End?

Microsoft continues to be the software industry’s leading producer of inept marketing strategies.  Where do their marketing “experts” come from, and how do they keep their jobs?  Bill Gates and Steve Ballmer are brilliant, yet they appear just as clueless about marketing by allowing these ridiculous plans to see the light of day.

With Windows XP we have Home Edition, Professional, Media Center and Tablet PC Edition.  Media Center never should have existed, because it is simply XP Professional with another application (called Media Center) installed, and a few extra device drivers for the infrared receiver and TV tuner cards.  Media Center is only available with a new PC.  Is there any logic behind this whatsoever?

In Windows Vista, Media Center functionality is integrated into most of the product line, and can be purchased after the fact.  I guess someone at Microsoft couldn’t figure this one out sooner.  (And by the way, if you’re buying a new PC and have a choice between Professional and Media Center, always choose Media Center because it literally is Professional — without the higher price tag.)

Now, to just make things even more convoluted, Windows Vista is arriving with SIX versions!  Yes, SIX!  They are: Starter, Home Basic, Home Premium, Business, Enterprise, and of course Ultimate, because the goal is to confuse your customers as much as humanly possible!  Oh, and there are two more versions just for European customers that don’t include Media Player, but you can thank the EU antitrust courts for those.  For at least some of these versions, when Joe Consumer gets it home and installs it, then realizes that he doesn’t have the feature that he wanted in the first place, he can hop online and buy it as a download direct from Microsoft.  Gee, thanks!

Visual Studio 2005 and Team Foundation Server (altogether known as Team System, not to be confused with Team Suite. Sigh…) packaging and licensing is a complete and utter disaster.  Did you know that there is a 50+ page whitepaper for partners that attempts to describe how the licensing works?  It is THAT complicated and THAT convoluted.  The products are overpriced and on a path to failure unless Microsoft gets its act together.  Your average development shop is not going to be able to afford TFS, leaving Fortune 1000 sized corporations as the main customers.  Microsoft’s own (highly valued?) partners, even at the Gold level, do not get licenses for TFS.  Instead, we get a 180 day trial version and a full version of Visual SourceSafe 2005.  Terrific.

There are four different “Editions” of Visual Studio 2005 – “for Software Architects,” “for Software Developers,” “for Software Testers” and “Team Suite” which puts the three former editions together in one box – and is the only one worth buying.  I’m an architect and a developer, and the only way I can use the new architect tools while taking advantage of developer tools like unit testing is with Team Suite, which naturally costs a lot more.  Since my client doesn’t have Team Suite, I had to go with the “for Software Developers” edition and forgo all of the new architecture tools.  I could have used them to design the system we just finished building.  Thanks Microsoft.

You must be thinking that it couldn’t get any worse.  Rest assured that it does: BizTalk 2006 and Windows Workflow Foundation (WWF).  Microsoft just got done putting a huge marketing push behind BizTalk, even including it in the massive VS 2005/SQL 2005 product launch.  At about the same time, they started making a big deal about WWF.  Brilliant timing.

Everyone knows that WWF is going to handle some of the same things that BizTalk does, primarily “orchestrations,” and be easily extensible.  The perception is that WWF is new and cool and the future direction for workflow apps, so why use BizTalk?  BizTalk already had a bad reputation for ease of use in the development tools.  To compound the problem, all of the BizTalk bloggers/authors/speakers dropped BizTalk in a flash, and most are now writing and speaking about WWF.  There are already multiple WWF books coming out.  In contrast, only one BizTalk 2004 book has ever been published, and the main author was Microsoft’s (at the time) product manager for BizTalk.

I believe that BizTalk Server 2006 is going to go nowhere except to those companies already using BTS 2004 or older.  Microsoft’s skilled marketers killed any potential growth for BizTalk 2006 with WWF.  The only hope is that in BizTalk v.Next, when WWF replaces the orchestration engine, it will still be alive as a viable product.

You can look beyond all of these examples to Office, .NET (remember when every new product was announced as XYZ.NET Server?), ActiveX and any number of other cases in Microsoft’s history to see the continued incompetence of their marketing departments.  It’s frustrating to watch, and it never ceases to amaze me that even Gates and Ballmer don’t get it.

One Down: Exam 70-529 – .NET 2.0 Distributed App Development

It’s been quite some time (C++/MFC/COM era) since I’ve updated my Microsoft certifications, so with the brand-new .NET 2.0 exams trickling out, now seemed like a good time to renew.  The goal this time around: MCPD Enterprise Applications, or Microsoft Certified Professional Developer: Enterprise Applications Developer.  (If you hadn’t heard, Microsoft revamped the certification program yet again.)

I started off by taking 70–529 – .NET 2.0 Distributed Application Development about a week ago.  This is a 40 question, 2 hour (maximum) test that covers Web services, WSE 3.0, Remoting, MSMQ, “serviced components” (i.e. COM+) and asynchronous calling patterns and Remoting events.  The interesting things about this test are that 1) Remoting is an almost-dead technology and 2) WSE 3.0 is not even part of the .NET Framework.

Remoting still exists in .NET 2.0, but no one at Microsoft will recommend writing any new code with it.  It’s really only there for backward compatibility.  You should have heard of Windows Communication Framework (formerly Indigo) by now, and Remoting will truly be dead when it arrives.  Remoting should have had little or no presence in this brand-new test, but it’s there, so you need to know it.

Aside from that, the rest of the topics are quite relevant to any .NET developer writing distributed applications today.  The questions are multiple-choice style, with choose-one, choose-two, and choose-all variants.

Final result: Pass, score 953 (passing is 700).

Get the Consolas Font for Visual Studio 2005 from Microsoft

Every now and then Microsoft releases an update for Visual Studio that arrives with little or no fanfare, and the latest example is the Consolas font package.  According to Microsoft, “Consolas is intended for use in programming environments and other circumstances where a monospaced font is specified.”

Consolas is specifically designed for ClearType, Microsoft’s advanced font-smoothing/anti-aliasing technology found in Windows XP and Windows Server 2003.  According to the licensing terms, Consolas is only available to licensed users of Visual Studio 2005.  Of course, the font would be useful in many other environments.  When you install the package, it changes the default text editor font in Visual Studio 2005 to Consolas.

I’ve only spent a day with Consolas, but so far I like it.  You will probably need to adjust your ClearType settings with the ClearType Tuner to avoid having the font appear either too light or too dark.  ClearType is mainly intended for LCD screens, but I’m using it on a CRT with good results too.

BizTalk 2006 Requires MMC 3.0

After many (many) technical and licensing discussions, my current client is moving forward to BizTalk 2006 from BizTalk 2004.  We’re excited to finally be able to dump the last SQL Server 2000 and VS.NET 2003 installs and go pure-2.0.

That said, I’ve been busy with BTS 2004 to 2006 upgrades and new installs lately.  I found that BizTalk 2006 requires MMC (Microsoft Management Console) 3.0 — but the new and improved BTS installer doesn’t appear to check for it, nor does it install it if you don’t have it!  After installing 2006, I tried to open some of the BizTalk MMC snap-ins and was informed that I didn’t have MMC 3.0.  Hmm… so much for the dependency checker and automatic download and install of “all” of the software prerequisites.  It’s still better than 2004, but how could they miss this??

Save yourself a few minutes and just install MMC 3.0 beforehand.  There are different installers for each OS variant, so you can search Microsoft Downloads for “MMC 3.0” to find what you need.  This search link might get you there quicker.

[5/18/06 Update] – Evidentally the Enterprise SSO Admin snap-in is the only one that requires MMC 3.0, so you can get away with 2.0 for most of your tasks.  However, I’d still advise upgrading to 3.0 to avoid the day when you need that snap-in, the server is in production, you can’t open it, you can’t restart the server, and you throw the keyboard across the room in frustration!

To Throw or Not to Throw?

You may have noticed inconsistencies in the .NET Framework BCL (Base Class Library) since 1.0 with regards to the behavior of Get/Indexer methods when the requested value does not exist.  For instance, the indexer on the 1.1 System.Collections.Hashtable class returns null/Nothing if the requested value does not exist.  However, the indexer on System.Data.DataRow, which you often use to retrieve column values from a DataTable, throws an exception if the requested column does not exist.  In yet another twist, System.Reflection.Assembly’s GetType() method has two overloads that accept boolean parameters indicating whether or not to throw an exception if the type is not found.

These differences are the result of various Microsoft BCL development teams and individuals with differing opinions on “throw on missing” vs. “don’t throw on missing.”  This has been a long-running debate inside Microsoft, and it’s something that you should also consider carefully when designing your classes.  While working at Microsoft several years ago, I had the opportunity to monitor some of these debates on several of the internal technical discussion groups (which carry massive amounts of emails).

The first question you might ask is: in an average execution flow, would I expect to encounter missing values, or does that represent an exceptional circumstance?  In a general purpose class when you don’t know how it will be used, there’s no way to answer this question.  This, of course, is the problem that Microsoft faces.

Fortunately, it appears that a consensus has finally formed within the BCL team.  I believe that it is a reasonable compromise between the two approaches and introduces a pattern that is easily recognizable by developers while maximizing flexibility.  This pattern includes a pair of methods: Try<Operation>() and <Operation>().  For example, TryGet() and Get().  It’s a very simple idea — the Try version of the method returns a boolean indicating whether the operation will succeed or fail, and the non-Try version throws an exception if the operation fails.  The biggest downside of this approach, in my opinion, comes down to the additional clutter it brings to a class – namely, doubling the method count for certain types of methods.

It’s important to be aware of this pattern, because you will find it in many places in the .NET Framework 2.0 BCL.  The new classes in System.Collections.Generic might be the ones you encounter most often, but you will also find this pattern on the common types, like Int32.TryParse() and Int32.Parse().  It’s interesting to note that this pattern existed in 1.0/1.1, but only on the Double class!

One potential gotcha, which represents a big difference between 1.0/1.1 and 2.0, is that the indexer on 2.0’s Dictionary (hashtable) throws KeyNotFoundException when the key is missing, and in 1.1’s Hashtable, the indexer does not throw an exception in that case.  Be careful of this difference when you’re used to 1.1 and working in 2.0, or vice versa.

When you’re designing classes, I encourage you to take advantage of this pattern (where appropriate) to make the behavior of your classes more predictable and consistent with the rest of the Framework.

Test Your HTML with the W3C Markup Validation Service

A co-worker asked me today about an issue in a Web app in which pages display correctly in IE 6.0 but incorrectly in IE 5.5.  He could duplicate the problem in IE 6.0 by changing the page’s <DOCTYPE> tag.  Sometimes issues like this are due to rendering engine differences (or bugs) in various browsers.  However, I very often see developers test the code and functionality of their Web pages, but fail to test the HTML.

There are far too many Web pages out there that have broken and/or sloppy HTML.  I know, I know, you have a deadline to meet and as long as it works on your computer it’s fine, right?  Hopefully that’s not your attitude.  There’s an excellent, free tool from the W3C that can quickly and easily validate your HTML and give you a list of errors and issues.  You can quickly jump to the trouble spots and make corrections.

The W3C (World Wide Web Consortium)’s free Markup Validation Service can validate HTML, XHTML, MathML, SMIL and SVG documents, and it is still being tweaked and improved.  I highly encourage you to add it to your Web development toolkit.

Don’t Change the BizTalk SSO Service Account — Or Else

Helpful hint du jour — if you know what’s good for you, don’t change the service account of your master BizTalk 2004/06 Enterprise Single Sign On service.  If you insist on doing so, make SURE you have backed up your master secret first!  As you may know, BizTalk Server 2004/06 stores much of its own configuration in the encrypted SSO database.  If you change the service account, or even, I believe, its password, the service modifies the SSO database and will render your entire BizTalk group useless.  Supposedly, after you change the account you can restore the master secret from your backup to fix the destruction, but I think it depends how lucky you feel.  Go make sure your service account is set to “password never expires!”

One of my clients made this mistake, but thankfully the BTS group was not yet in production!

This Thursday is the latest Twin Cities BizTalk User Group meeting at Microsoft Bloomington at 6:30 PM.  Please join us!

Updated 08-28-2006

I suspect that Enterprise SSO uses DPAPI or the broader CryptoAPI for data encryption, and also probably to encrypt the master key itself in the service account user profile.  This explains why changing the service account causes the service to be unable to read the database.  The master key remains with the original user profile and does not exist in the new one.  I do not think that changing the service account password will have any effect, as long as you remember to update the password in the SSO service configuration.

The solution, as I originally mentioned, is to restore the master key while the service is running under the new service account.  This has the effect of copying the master key from the original service account user profile to the new user profile.

If you changed the service account and did not have a backup of the master key, you might have a chance of saving your configuration by switching back to the original account.  If that doesn’t work, you will have no choice but to completely reconfigure your BizTalk installation.

Here is a Microsoft KB describing the procedure to change the SSO service account.  This process works in 2004 or 2006.  The difference in 2006 is that you may choose to backup and restore the master key through the SSO Administration MMC snap-in (requires MMC 3.0).

%d bloggers like this: