This past week, I battled to install Microsoft Dynamics CRM (MSCRM) for almost 6 hours. I’ve done countless attempts and fought every problem, so believe me when I say this is such an odd event in my life these days that it actually is enjoyable trying to figure out the problem. Now, normal MSCRM install issues happen either at the Environmental Diagnostic Wizard stage or during the actual install. This happened much earlier—in fact, when I tried to add a license key.
When adding the key and hitting Add, I got a dialog saying:
The specified license is invalid.
For additional details, see logfile: C:\Documents and Settings\XXX\Application Data\Microsoft\MSCRM\Logs\crm30svrsetup.log
Odd—but maybe it was wrong. I tried it a few times and thought, "Well, I’ll just pop on my trusty 90-day trial to get up and running and deal with Microsoft about issuing a new key." Guess what? The trial key failed too.
I’m not posting this on my IW blog (see right bar) because it’s more than just an MSCRM issue. Then I thought maybe something in the OS was wrong, so I installed all the patches and rebooted. One of the patches was Internet Explorer 7, which also refused to install with the error:
Setup could not verify the integrity of the installation files. Make sure the Cryptographic service is running on this computer.
What now? I tried numerous articles and suggestions gleaned from the internet, including a Microsoft KB article (822798)—which, shockingly, lists reinstalling Windows as an option (no, I didn’t do that; this box is running other applications just fine).
But here’s what I learned: All Microsoft software is digitally signed, but if something goes wrong with the certificates on the machine, it borks the installation of those applications. MSCRM, in my mind, had the same problem—since it (I assume) uses digital certs to perform a CRC (or similar) check on the license key.
What was interesting was that all the certificates were 100% fine, but if I right-clicked on the MSCRM install MSI file and checked it, it kept saying the certificate had been revoked. Odd? Because it wasn’t revoked on my machine or any other machine. And if Microsoft revoked a certificate like this, why wouldn’t I know about it? Hell, why are they still shipping IE with it? Something was clearly wrong.
What I found was a rogue revoked certificate installed—where it came from, I don’t know, but it was there. To remove it, I opened IE 6, went to the Tools Menu → Internet Options, then on the Content tab clicked Certificates, and on the last tab (Untrusted Publishers), I was able to see the rogue certificate and remove it. After that, everything installed fine.
Now, just a side thought on this: Microsoft recommends digitally signing all software. So if I were an anti-virus company or security company that took this seriously, I would not only sign the install of the software but also the runtimes and update definitions. The downside? If a virus/trojan could install a revoked certificate (not sure what privileges you’d need on XP, but I guess this is a UAC-controlled operation on Vista), it could bork all your security. Scary how one file can do that.
Update (13 Feb 2008): Trust me to have the wrong link for that Microsoft KB article, then send it to a client as the solution to their problem. DOH! Fixed now.
Being bored is part of life, and as people, we try our best to avoid it. When bored, we do things like play Solitaire, send gifts on Facebook, or blog 😉 to try to avoid it. Well, I say no more—from now on, embrace boredom, make it a part of your life. When bored, tell the world you’re bored, and do it with Twitter.
Twitter is a smart and simple idea: Simply put, in 140 characters or less, answer the question: What are you doing right now?
It’s great fun, easy to do, and makes you really transparent (more so than blogging can).
If you feel like following me, you can at http://twitter.com/rmaclean.
My employer, the i5 Group (www.i5.co.za), won the Microsoft ISV Partner of the Year at Saturday’s gala event 😎.
This was for the work done around the Rezonance product brand, which I’ve had significant interaction with—so this means a lot for me. It’s also a huge surprise for me, since the South African ISV market is very strong (thinking of the K2 guys).
Well done to everyone involved!!
If you are a regular to the site, you may know that I have had some great service from my previous hosting provider, Hetzner. Which may make you wonder why I decided I needed to move the site. Well, the reality is that it’s about the money at the end of the day. When I joined Hetzner earlier in the year, I took their Basic package since it met my needs, and I was able to sign up and get sorted very quickly. Plus, they’re a South African company, so getting help over the phone wasn’t hard. What I didn’t realize was how much space I got from my previous provider.
So I ended up with tight limits on what I could upload. Eventually, I exceeded it (mostly with the photos) and started paying extra per month. Now, based on how many photos I had sitting to upload, I realized this would get expensive and put a hold on uploading them (until today). Interestingly enough, I hardly used any of the other services on the package—bandwidth never exceeded my limits, no mailboxes were used (I have one forwarded to GMail, etc.), so all I needed was disk space. I had thought of using sites like Flickr but it didn’t appeal to me too much. And when my wife decided to start her own part-time business and she needed a site, I decided to look around again for something that would meet both our needs, as with Hetzner, I would need another package.
Browsing the Drupal site (which I use for my CMS), I found a list of recommended hosting providers and started to go through that. I found Web Hosting Buzz through that and was very impressed—especially with their 30-day money-back guarantee, which put me at ease. I signed up for my wife’s site first, got that set up, and once that was online, moved my site across.
To give you an idea of the differences:
| Hetzner | Web Hosting Buzz |
|---|
| Cost per month | R99 | R36 ($54/year * R8 exchange rate) |
| Disk Space | 100 Mb | 300 Gb |
| Transfer | 1.5 Gb | 2000 Gb |
| Websites | 1 | Unlimited |
It’s kind of a no-brainer for me! And I’ve already put WHB to the test with some interesting support calls—they’ve come through each time. One example: I saw SSH access listed on their site (which Hetzner didn’t provide), and when I inquired, it was set up in minutes for me.
Would I recommend Hetzner still? Definitely, but you need to be the right type of customer—the kind who needs South African hosting and ideally has their own server. Nowadays, for personal sites, the options (free or paid) overseas are too good to compare.
Review Taglocity is a plugin for Outlook 2003/2007 that offers the same idea as tags on blogs (like on the right) but for email. Now, this isn’t really anything special for Outlook, as you can get basically the same ability using flags. There are three really good features in it, though, which help it stand out above just flags:
There is a tag cloud view at the bottom of Outlook. This is great since you can have easy access to more tags than you can with flags. However, it appears either as a floating window (annoying) or docked (better), but in either mode, you can’t choose what windows it should show on—so it shows up everywhere. I’m a power calendar user and really don’t need to lose space to tags in an area where I won’t use them.
Next is the auto-tag feature, which uses Bayes to predict what tag should be applied to each email. This is a great idea, but not well implemented. Firstly, when I get to the office in the morning, I generally receive about 30 emails, which causes Outlook to lock up for 1–2 minutes while it auto-tags. It also doesn’t auto-tag blog posts. And in the end, it seems to either want to tag everything or tag nothing—maybe that’s because I deal across a lot of different subjects with different tags, making it harder, but it really shouldn’t be this way.
Lastly is the find feature, which lets you do proper boolean expression searches based on tags—really useful since the results are almost instant. The downside is that it’s limited to the current folder, with no way to search all folders.
Anyway, after using the professional trial for 14 days, it expired, and I now have the option to purchase or drop to the personal edition. The personal edition has a tag cap, which is a problem since I do need a lot of tags. Based on the negative points in the main features, I can’t agree to pay for it. So in the end, it’ll go the way of the dodo and be uninstalled.
Sidebar: Details and downloads on Taglocity can be found at http://www.taglocity.com. I used Taglocity 1.1 with Outlook 2007 on Vista. Outlook 2007 was patched with the performance hotfix. This ran on an Acer TravelMate 3270 laptop (Intel Core 2, 1.67 GHz, 1.5 GB of RAM, 80 GB hard drive).
Continuing with my earlier post on enums where I proved people wrong, I decided to prove another MVP wrong. Once again, for those who are already in the know, they can skip to Example 2 below.
FindControl Basics
First, a primer on FindControl, taken from the MSDN help:
Searches the current naming container for a server control with the specified id parameter.
Example: The following example defines a Button1_Click event handler. When invoked, this handler uses the FindControl method to locate a control with an ID property of TextBox2 on the containing page. If the control is found, its parent is determined using the Parent property, and the parent control’s ID is written to the page. If TextBox2 is not found, "Control Not Found" is written to the page.
private void Button1_Click(object sender, EventArgs MyEventArgs)
{
Control myControl1 = FindControl("TextBox2");
if (myControl1 != null)
{
Control myControl2 = myControl1.Parent;
Response.Write("Parent of the text box is: " + myControl2.ID);
}
else
{
Response.Write("Control not found");
}
}
Searching Master Page Content Using FindControl
You could build a recursive FindControl method that searches master pages and content pages internally by looping through each control and checking the ID—but then you’d also need to build one for the offset-overloaded version. Sounds like too much work, and I guess Microsoft thought so too, since it was never designed this way.
Example 2: If you wanted to search the master page for a control, you could do the following:
this.Master.FindControl("ControlID");
This will find any control in the master page that happens to have the ID "ControlID". This control could be a sub-control of another control.
What’s going on here? Well, to understand, I downloaded the famous Reflector and searched Microsoft’s framework for this. The relevant snippet:
protected virtual Control FindControl(string id, int pathOffset)
{
string str;
this.EnsureChildControls();
if (!this.flags[0x80])
{
Control namingContainer = this.NamingContainer;
if (namingContainer != null)
{
return namingContainer.FindControl(id, pathOffset);
}
}
}
The key takeaway is the recursion happening here. Thus, we don’t need to worry about it ourselves.
But there’s a problem: This only searches the master page. How do we get to the content page?
Example 3: If you wanted to search for a control in the content page, assuming our Content PlaceHolder has an ID named "Content", you could do either of these:
this.Master.FindControl("Content$ControlID");
OR
this.Master.FindControl("Content:ControlID");
There you go—now you can find any control (nested or otherwise) on any content page!
Enums in .NET are very powerful in defining options. By default, when you define an enum, it automatically assigns them sequential integer values starting from 0 (if you don't specify a start value). So how do we work with these dynamically? Well some say you can't, and they are wrong. But first, let me cover the basics—if you want to skip over this, scroll down to Example 6.
Basics of Enums
Example 1
In this example, First is equal to 0, Second to 1, and Third to 2.
public enum Demo { First, Second, Third }
Example 2
****In this example, First is equal to 1, Second to 222, and Third to 986.
public enum Demo { First = 1, Second = 222, Third = 986 }
Example 3
What’s nice is that if you just want to change the start position, you can define that only. In this example, First is 10, Second is 11, and Third is 12.
public enum Demo { First = 10, Second, Third }
Example 4
Even better is the ability to decorate the enum with the [Flags] attribute, set the numbers (Raymond Chen explained why this isn’t done automatically), and use it as bitflags. Note the integer values are in traditional flag values, with None set to 0 and All set to the combined value.
[Flags]
public enum Demo
{
None = 0,
First = 1,
Second = 2,
Third = 4,
All = 7
}
Example 5
****So how do we use those flags? The code below will output:
First, Third
The code is:
static void Main(string[] args)
{
Demo Enum = Demo.First | Demo.Third;
Console.WriteLine(Enum);
}
Dynamically Using Flags with Enums
Now that the basics are out of the way, here’s the fun part. I continue to use the definition from Example 4 above.
Example 6
****First, I will show how to add a value to the enum variable. I start by defining the enum to None (0 value) and then use the OR concat (|=) operator to add each enum. This code will output:
Second, Third
The code is:
static void Main(string[] args)
{
Demo Enum = Demo.None;
Enum |= Demo.Second;
Enum |= Demo.Third;
Console.WriteLine(Enum);
}
Example 7
****In this last example, I will show how to remove a value from the enum variable. I start by defining All (integer value of 7) and then use the AND concat (&=) operator and prefix the enum value with a tilde (~). This code will output:
First, Third
The code is:
static void Main(string[] args)
{
Demo Enum = Demo.All;
Enum &= ~Demo.Second;
Console.WriteLine(Enum);
}
A while ago I blogged about some fun from being an early adopter. The issue that caused it was that Vista wouldn’t update—funny enough, the new stuff didn’t help at all. What was happening was that I kept getting an error while not connected to the work network, because my machine was set to get updates from the company WSUS server. While on the network, I got a different error—8007000b if I remember correctly.
For love or money, I couldn’t fix it, until I stumbled upon the fact that WSUS 3.0 had been released. Upgrading the company WSUS server to that fixed the problem. It turns out we were using an RTM of 2.0, and Vista support was only added in 2.0 SP1. Regardless, 3.0 is really worth the upgrade.
The only problem is that now I’m getting new patches almost every day until I catch up with all of them.
Anyway, grab all the yumy WSUS freshness at http://technet.microsoft.com/en-us/wsus/default.aspx.
This past weekend I braved Makro and the evil hordes that invade it on weekends to buy my first potjie since I had asked some friends over on Sunday for a late lunch. Since I had never made a potjie before, I did some online searches and found a few articles—but in the end, I decided to just go crazy. From all accounts, the food was good, so here is the recipe:
Ingredients:
- 1.3 kilos of beef, cubed into about half-inch sizes
- 3 very large carrots, diced into bite-sized pieces
- 4 large sweet potatoes, cubed into about half-inch sizes
- 2 pounds of button mushrooms, diced
- 2 green peppers, diced
- 2 large sweet peppers, diced
- A cast of other things I forgot about now and will unveil during preparation.
Cooking: Take the meat and add some freshly ground thyme, rosemary, and Robinson’s meat tenderizer. Put that in a container, add a couple of dollops of Mrs. Ball’s chutney, BBQ-flavored marinade, and Bandito hot sauce (I used the 5-heat-level one). Close the container, shake, and store in the fridge, turning it every so often until needed. Mine sat for about 3 hours, but the longer you leave it, the better.
Once your potjie is nice and hot, add all the veggies plus half a liter of water and leave for about 30–45 minutes. Next, add the meat and the basting sauce it has been in to the mix and throw in two cubes of beef stock and two packets (50g each) of tomato paste. Mix well, close the lid, and leave for 2 to 3 hours, stirring every 15–20 minutes. Eventually, the liquid should reduce and you’ll get more of a thick sauce than soup—think of it as a stew almost. If it starts to catch on the bottom, it’s ready (and has been for about 10 minutes or so). Move it to low heat and dish up on rice.
Before I begin, let me clarify a few points so you are aware of the context of this post:
- I currently work for a Microsoft Gold Partner, have been contracted to Microsoft (through my employer), and spoken at TechEd.
- Before that, I worked for a company that used almost solely open-source software and developed software for it. I also did work with the Shuttleworth Foundation at the Linux Days event.
So I have been on both sides of the fence.
Now, on to the content...
Go anywhere near Slashdot and mention Microsoft, and you will get at least a few zealots who complain about its attitude/actions toward FOSS (Free and Open Source Software). Well, I am not going into the free part, since until I can live without money, making everything free doesn’t help. And there are many people in the traditional OSS community who do make money (Red Hat, Novell, many Linux contributors, etc.), so I guess I’m not alone in this view.
But many people bring up the open-source side, which makes less sense to me. Microsoft does have this shared source—some special license for special people—but that doesn’t fit with true OSS, where anyone can access it. So I’m not including it.
Microsoft has Port25, their public front for their internal open-source lab, which has some interesting information, but it doesn’t really push OSS.
There are also a few "sponsored" projects on SourceForge and the now-defunct CodePlex. Neither of these pushes OSS as part of major projects. So while beneficial, they aren’t big enough.
So what doesn’t make sense to me? Simple: the .NET framework is completely open source. All of the .NET assemblies are in source code (IL) all the time, and thanks to reflection, they can be transformed into a convenient language of choice for the viewer. Since .NET is Microsoft’s big push, the new core of their systems will be open source.
This can be seen currently with their applications built on top of it—like Microsoft CRM, which has all their assemblies in .NET and can all be opened and viewed.
Microsoft CCF is even further advanced, including some applications in .NET (like the admin console), but the bulk is available in direct source code. BTW, neither are obfuscated in any way, so there is no attempt to close this source.
Agreed, the core money makers (Windows, Office, etc.) are still closed source, but how much of that is legacy versus how much is based on the choice of language tool (C++ Win32 vs. .NET), and how much of that is specific plans to close off the source? I can’t say—and no one outside the core executive at Microsoft could say, either.
But the argument that Microsoft doesn’t get it is just wrong. They do get it and, probably, more than most of the zealots mentioned earlier, since they have figured out how to use it strategically.