Winforms Project – Unspecified error (Exception from HRESULT: 0×80004005 (E_FAIL))

We’ve been recently working on a Win Forms projects for the first time in a long time. Whilst working through the security and trying to implement Client Application Services following this we ran into a problem. By right clicking on the User Interface Project, then selecting “Properties”, then clicking the “Services Tab”, we got the following error, “Unspecified error (Exception from HRESULT: 0×80004005 (E_FAIL))”.  We are using Visual Studio 2010 Ultimate, with .Net 4.0 Targeting.

Solution:-

We deleted the existing UI project and recreated it , added back our source code and presto it all worked again. My guess is the project file had become corrupted in some form.

We’re now up and running again, implementing our security providers and locking down our application.

SharePoint 2010 Error TaxonomyPicker.ascx

I love having a Development Environment I can simply return to a known snapshotted point, but it seems so long between new set ups that you forget some of the gotcha’s that you fixed when you initially set it up. This is one of those really frustrating ones that seems to appear on a lot of servers in the wild and one I’d completely forgotten about until today when I had to fix it again.

I got the following critical error :-

Web Controls Critical 7043 Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type ‘Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker’ from assembly ‘Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’.

The fix for this is simple, open the TaxonomyPicker.ascx control which is in the hive under ControlTemplates (the full path is usually C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES) and take a look at the top of this file:-

<%@ Control className="TaxonomyPickerControl" Language="C#" Inherits="Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker,Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Highlighted in this snippet is the , which is the html encoding for a comma (,), by adding an actual comma and a space after it this issue is fixed, so this line should look as below:-

<%@ Control className="TaxonomyPickerControl" Language="C#" Inherits="Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker, Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Thats it fixed, the error is gone, if only all critical errors that appeared were that easy to fix.

Booting Samsung N130 from USB Drive

With Christmas time around again I’ve been doing a bit of the freebie IT support for friends and family that we all seem to do. This time I got well and truly stumped trying to get Windows 7 installed from a USB flash drive on Samsung N130. I used WinToFlash to create the bootable drive as I’ve previously blogged about here.

I couldn’t work out how to get this PC to boot off USB drive, tried selecting the drive with the boot menu and changing the boot device to the USB drive, with no luck. I stumbled upon this post here, where I found my solution. All I had to do was to change the boot order to make all the USB devices appear at the top of the boot order in the BIOS making the hard drive the last device and it worked a treat. Seems pretty odd you need to this, my thoughts would be this is a bug in the bios.

Anyway Netbook is now running a treat with Windows 7, only had to install the Wireless Driver.

Windows Live Writer Beta– Post Draft to Blog

After hearing all the buzz this afternoon on the new Beta of Windows Live Essentials release, I decided to upgrade. The main thing that has changed you will notice straight away is the new ribbon interface in it. I really like the ribbon interface, it’s actually difficult to go backwards when I’m forced to use old versions of Office when on client sites.

image

The one thing that I couldn’t find in this interface was the two features I use the most, “Post Draft to Blog” and “Post Draft and Edit Online”. I use these a lot as I blog from multiple PC’s so it’s fairly normal for me to start on one PC and continue on another. Although missing from the ribbons, when you look a bit deeper these features are still there. You can find these options by selecting the “Quick Access Toolbar” in the top left corner (where file used to live), then selecting “Save”.

image

Since I use these options all the time, by right clicking on the item you can add them to the Quick Access Toolbar so they displayed across the top.

 

image

image

Office 2010 RTM 32bit vs 64bit Versions

As we’re all aware of by now Office 2010 has been released to manufacturing which has it and SharePoint 2010 becoming available to MSDN & TechNet Subscribers. On first impressions this version has been pretty good, I’ve been running the beta client pieces for the last 6+ months. It seems there’s a little confusion that has slipped in with this release though as for the first time we have both 32 and 64 bit versions of this release. If you’re like me and running 64bit OS (Win 7 in my case), because you need more than 4Gb of RAM.

A trap that I found out from Ben Walters presentation at this months MOSSIG meeting was that Microsoft’s recommendation is to use the 32 bit version of Office 2010 even on a 64 bit Operating System, unless the user needs to manipulate large files, which I’m guessing is over 4Gb given that’s the 32 bit memory limit. Another interesting point for this was also that the plug-ins are going to be harder to get in 64 bit which probably a fair point. This little gotcha isn’t very well publicised but I found this line of text “In enterprise environments, the default is to install Office 2010 32-bit on computers that run either 32-bit or 64-bit editions of Windows operating systems. We recommend this option.” which I found within this TechNet article.

Anyway time to uninstall 64 bit and go back to 32 bit.

Configuring SQL Report Server 2008 SP1

When configuring a SQL 2008 SP1 reporting server I got this error, “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel”  when I trying to view the http://servername/Reports url. This appeared a bit odd as I wasn’t trying to connect via SSL to the site.

 

image

Luckily the fix here was an easy one, I simply had to alter the “rsreportserver.config” file and make the following change.

From:

 
<Add Key="SecureConnectionLevel" Value="2"/>

To:

 
<Add Key="SecureConnectionLevel" Value="0"/>

Which resolved the issue and displayed the page.

image

 

There is more detail on this here. This basically means that this will need to be revisited again when it comes time to enable reporting services out to the web via an SSL.

Creating Win 7 & Server 2008 bootable USB Flash Drive Part 2

A while ago I blogged about installing windows from a USB Flash Drive. Since then I found an awesome tool called WinToFlash which is a point and shoot tool which will automatically create a Bootable USB Flash installation source. Try it out, it’s pretty simple and not only makes bootable copies of the install media, but also does some other cool stuff you can read about here.

Slipstreaming SQL 2008 Sp1

If you try installing SQL 2008 RTM on either Windows 7, Vista Sp2 or XP Sp3 you will find that install fails. There is a really easy fix for this by simply slipstreaming Sp1 with the RTM image by following these instructions here.

In terms of the actual problem I’m not sure of what the exact cause is here although I suspect it’s related to this issue with MSXML.

Creating a Windows 7 RTM bootable USB Key

*** UPDATED  17th August 2009  ***

For some reason the copy and paste of this last point of this post didn’t come through, thanks Jason for picking this, anyway it’s all updated now.

With the release over the weekend of the RTM of Windows 7 I’ve been doing a wholesale upgrade of all of our PC’s. On my laptop this was easy as I have a DVD drive, but we also have a couple of Netbook / Ultra Mobile PC’s a Fujitsu U1010 Tablet and an Asus EEEPC. What you  need to do this is a USB drive that is 4Gb or greater. Another thing to also note is that some of these USB drives come with a special partition installed by the manufacturer which will not allow the Win 7 partition to boot. In my case I used a San Disk 8Gb Cruzer which come out of the box with a U3 partition on it. I think this same process can be used for Vista installations but I haven’t tested this.

Remove U3 Partition

To remove the U3 Partition you simply have to download this utility, and run it as an Administrator. If you’d like to reinstall the U3 tools after you’ve finished you can download this utility to restore the partition to your flash drive.

Formatting the Flash Drive

  1. Plug in the flash drive and let windows detect it.
  2. Open a “Command Prompt” as “Administrator” Right Click on the Command prompt and select “Run As Administrator”, now type the following commands into this window.
  3. Type “diskpart
  4. Next we need to find the drive number of the usb disk for the next step by entering “list disk”. Each disk will be listed with a number next to it, in my case this was disk 1.
  5. The next step is to format the drive, simply substitute your disk number where I use 1. At this point it’s probably time for a coffee as this will take a few minutes.
select disk 1
clean
create partition primary
select partition 1
active
format fs=NTFS
assign
exit

Making the drive bootable

  1. Insert the Windows 7 DVD or mount the iso.
  2. In the same Command Prompt that was open before change the directory to DVD’s boot directory (“\boot”) which is “bootsect.exe” is located, this is the tool that will be used for the step of this process.
  3. Run following command, assuming the “F:” is the usb drive. “bootsect /nt60 f:

Copy the Contents of DVD to the Flash Drive

  1. Select all files on the Windows DVD and copy them over to the USB Key. The easiest way to do this is to use Windows Explorer.

Once you’ve done all the steps above your ready to go. Simply change the bios to boot off the usb device and the Windows 7 install should be ready to roll.

Top Link Navigation in WSS

We had an issue where we had developed a internet facing site in WSS for a client with a heavily modified navigation. As everyone probably does, we simply copy and pasted the url from the browser straight into the WSS Navigation, we found we had an strange problem, the highlighting on the top navigation of the WSS wasn’t highlighting correctly. Here are the  lessons learned from this:-

  • DO NOT” to use either full path’s ie “http://mysite/page.aspx” but to instead use a relative path ie “/page.aspx”.
  • “DO NOT” ‘%20’ for spaces, just leave spaces ie “/My%20Home%20Page.aspx” should be entered as “My Home Page.aspx”.
Posted in WSS. Tags: , . 1 Comment »