Reading List – March 2010

After a brief hiatus (i.e. hectic work schedule for a few months), I am back to reading. The list is currently :-

Actually, that is wrong. I picked up ‘ReWork’ by the 37 Signals guys and read it cover to cover, so that’s no longer on the list ;-)    – what a great book. Full of down to earth pragmatic advice and common sense (as you’d expect from these guys), a ton of snippets to take away and really inspiring. I must read this again to make sure I got everything.

GEO 51.4043388366699:-1.2875679731369

Cannot create Edge Subscription file

Edge subscription file import and export process

This is a pretty obscure gotcha..

I was trying to export an Edge Subscription XML file from my Edge Transport server (a demo Exchange 2010 environment)
There is no GUI for this in Exchange Management Console, so you have to use the Exchange Management Shell.

Opened up EMS and entered the command :

New-EdgeSubscription –Filename “c:Edge.xml”

image

image
I kept getting an error saying that “When running this task inside the organization, the Filename parameter must NOT be set.” Also, Google told me that a bunch of other people had experienced similar issues but had not found a solution.
A little investigation into why it thought I was ‘inside the organization’ uncovered that I had set the primary DNS suffix the same as the domain name. Changing this to something else, rebooting the server and trying it all again worked a treat.

Now… back to that Edge Subscription…

 

GEO 51.4043388366699:-1.2875679731369

Outlook Web Access – Document Access

It seems that ‘Document Access’ from Outlook Web Access (OWA) is no longer supported in Exchange/OWA 2010.

image

http://technet.microsoft.com/en-us/library/aa998911.aspx#Disc2007to2010

imageHowever, the way this element of ‘Discontinued Features and De-Emphasized Functionality’ is worded (“Can’t use…”) makes me think it is more of a known issue than a conscious decision they have made – where is the reasoning and/or alternative solution ? no mention…

Also, all of the configuration functionality for this feature still exists in Exchange 2010 Management Console.

Smells like they just didn’t get the Outlook Web App finished in time. I wonder if this will be in SP1 – it was a pretty neat feature after all – or will SP1 remove the configuration elements in the Management Console ?

GEO51.4043502807617:-1.28752994537354

Generate sitemaps using PowerShell

I was discussing ‘googlability’  – a new word I made up meaning ‘the ability to find via Google’ – of our knowledgebase with one of the technical guys at work.
It seems that we seldom get matches in Google searches (and the built in search is somewhat lame) – I was quite surprised with the fact that Google wasn’t matching anything.

Looking into it a bit further, I found that although our knowledgebase is public, the Urls are pretty undiscoverable, all having a ‘articleid’ parameter – obviously, the GoogleBot couldn’t just guess at the values and so was skipping the majority of our article, apart from the few listed on the main page.

We needed to give it some hints by adding a sitemap. I (ever so) briefly toyed with adding a sitemap page to the knowledgebase website using the standard XML based sitemap protocol etc, but our site is written in PHP and I didn’t want to get bogged down in all that again…
In a rare burst of being pragmatic and keeping things simple (as opposed to _way_ over engineering a solution) I recalled that Google’s webmaster tools allow you to submit a text file as a sitemap with one Url per line.

I knew the format of the Url for our articles so it just required a bit of PowerShell to generate a bunch of lines containing Urls with sequential numbers and write them to a file. version 1 looked like this :

set-content "c:sitemap.txt" (1..1000 | %{ "http://support.c2c.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=$_&nav=0`n" })

However, uploading this sitemap caused the Google machine to choke and spew out a bunch of errors about invalid Urls… A little more digging uncovered that the text file uploaded must be encoded in UTF8. So version 2 looked like this :

set-content "c:sitemap.txt" (1..1000 | %{ "http://support.c2c.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=$_&nav=0`n" }) -encoding UTF8

Out popped a text file with 1000 Urls, in the correct format, with the correct encoding and accepted by the Google machine with no problems.
Probably 10 minute work all in – I wouldn’t have even got the PHP coding tools fired up in that time – reminder to self “KISS works !!

GEO51.4043502807617:-1.28752994537354

Access ODBC Connection Strings

I was working on an old (classic) ASP page the other day. It was pulling data from an Access database file and using an ODBC driver to get the connection.

It was working fine on a Windows 2003 server, but when I pulled the file into a local website on my Windows 7 machine (with Office 2010 beta) it kept failing at the ODBC layer. The reported error message was :

Microsoft OLE DB Provider for ODBC Drivers error ‘80004005’
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Looks like the driver specified in my connection string couldn’t be found. I was using the following :

    objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:inetpubwwwrootpstdiscovery.mdb;"

This all looked correct and checking the excellent “ConnectionStrings.com” website they were saying the same thing – strange. It then struck me that I’m using Win 7 and Office 2010, either of which could have changed the ODBC driver or installed a new driver, so checking the “Data Sources (ODBC)” tool I see that the driver also works with .accdb files, so I’m guessing this is an updated driver.

Changing the connection string (adding the *.accdb) was the next step.

objConn.Open "DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=c:inetpubwwwrootpstdiscovery.mdb;"

Testing with this new connection string worked fine – problem solved….

image

GEO51.4043502807617:-1.28752994537354

Enabling virtualization when booting from VHD

imageI ran into some trouble with Hyper V the other day – I had booted from a VHD into Windows Server 2008 R2 and was trying to start a VM – I got the usual  ‘The virtual machine could not be started because the hypervisor is not running” error.
I had just had a BIOS failure on the machine so I figured it may have switched hardware virtualization support off in the BIOS when it reloaded the defaults.

Checking the BIOS, I found it was switched on – strange. I Googled a bit but everything seemed to be around flipping the setting in BIOS, when I knew to be correct.
Some further investigation around the boot environment and BCDEDIT settings I found the parameter “HypervisorLaunchType”, thinking this could well be connected, I set the parameter to “auto” in the BCD configuration:

BCDEDIT /set {big-long-guid} hypervisorlaunchtype auto 

This fixed it !!
So now all my BCD configurations go like this:

BCDEDIT /copy {current-or-guid} /d "New Boot Option"
BCDEDIT /set {new-guid} device vhd=[V:]vmimage.vhd
BCDEDIT /set {new-guid} osdevice vhd=[V:]vmimage.vhd
BCDEDIT /set {new-guid} detecthal on
BCDEDIT /set {new-guid} hypervisorlaunchtype auto

GEO51.4043502807617:-1.28752994537354

Exchange 2007 Access Denied when installing Mailbox Role

Yesterday as I was trying to install Exchange 2007 on Windows 2008 R2 Enterprise Edition, I got a pretty strange issue.

imageEverything worked well up till the ‘installing mailbox role’ phase – it seemed to fail pretty quickly when it got there. Subsequent retries also failed (quickly) with exactly the same error – ‘Access Denied’

A little bit of Googling uncovered that the ‘Setup’ for Exchange 2007 had to be run in ‘Compatibility mode’ for it to work correctly. Crazy I know, but it works.

Open a Windows Explorer to the DVD, right click on the setup.exe file and choose the Compatibility tab, then set it to Vista Service Pack 2 – now run it, and it should all work as expected.

 

GEO51.4043502807617:-1.28752994537354

Dual Boot is Dead – Long Live Boot from VHD

imageIt is official, dual booting is now dead – Boot from VHD is the new king.

On my flight to BoS2009, I was inadvertently reliving some nostalgic milestones from the past 10 nay 20 years.

I had my Windows 7 laptop, booted from a VHD (see Scott’s great post for some easy instructions on how to configure this) – the OS I had booted into was Windows 2008, I had installed the Hyper-V role and was running an install of Windows XP on a virtual machine at the same time was running a command line install of Exchange 2007.

If only I had brought my Windows 3.1 diskettes with me I’d have had a straight flush…. here’s how it looked…

installl-capture

 

GEO51.4043502807617:-1.28752994537354

WebApp KeepAlive Service

image Recently I have been working with DotNetNuke. This is a superb open source CMS platform running on ASP.NET with a SQL back end, simple to install, easy to use and there is a thriving community around it. It is also available in a ‘Professional’ version which costs around £2000 per year and provides additional workflow features, a support contract and various other benefits.

image I choose not to go for the pro version, just because I don’t see much point in having some aspects of a website/webapp covered with a support agreement, but not others (any third party controls/extensions are not covered, and I had bought the excellent DataSprings Suite and was using multiple components from it).

Anyway, when I had everything working the way I wanted, I started to look at performance. There are many websites providing tools and tips around maximizing performance of DNN sites – this includes caching strategies, output compression, turning off none essential ‘housekeeping tasks’ and the like.
One of the tweaks (for low traffic sites) was to ‘kick’ the site every few minutes to ensure that IIS does not unload it (and therefore need to spin it up again the next time someone visits – this can take a good few seconds).image

  My initial thoughts were around a scheduled PowerShell command – simple to come up a one liner to request a page and thus keep the web app in memory.

(new-object “System.Net.WebClient”).DownloadString(“http://www.website.com/”)

Then I thought I might have it ‘kick’ a few websites, and make it configurable, so I started thinking ‘Windows Service’. It turns out that there are a load of these apps and services available to buy, some targeted specifically at DNN, some more generic. Reluctant to spend $20/year on a service I decided to craft my own.

It is basically a windows service, that reads an XML file for a timeout and a list of urls to kick. It implements a 1 second timer and counts down the timeout value, when it reaches 0 it kicks each of the urls (recording how long the response took). I haven’t done anything with the measured response time, but it would be fairly easy to write out to a DB or file for later analysis…

Here is a .zip file with everything you need – binaries, sample configuration file, install instructions and full source. It is Creative Commons license so knock yourself out.

WebAppKeepAlive.zip

GEO 51.4043197631836:-1.28760504722595

Exchange 2010 Store Compression

logo-header-e2010 One of the things I (for I read we) have been working on recently (at my day job) is looking at the ‘Store Compression’ feature in Exchange 2010.

Store Compression is a new feature in Exchange 2010 whereby some of the content of an email object is compressed as it is inserted into the Exchange Information Store (and decompressed on the way out – when it is being displayed to the user). The reason we were looking at this was we initially thought it might compete with our MaX Compression product – a seriously fab product that transparently compresses and uncompresses attachment data in both Outlook/Exchange.

Anyway, this isn’t a sales pitch – so…

clip_image002I had one of the QA guys do some testing and a side by side comparison. From the results it seemed that our MaX Compression product still gives enormous savings – as significant as it did under Exchange 5.5 – Exchange 2007, so given the general perception that Store Compression compressed the whole email, I wondered whether the feature was actually implemented / enable in the Exchange 2010 beta. Checking with a few MVP colleagues it seems they had been assured it was… so a bit more digging was required.

After speaking to some contacts on the Exchange team at Microsoft, it seems that the Store Compression feature is in the beta (MVPs are never wrong ;-) ), but the feature does not compress the whole email object, as many people think – it just compresses some elements of the email object.

It turns out that, as you would expect, compressing and decompressing the whole email object (including attachments etc) as it goes in/out of the Information Store is way too processor intensive and in fact the design goal of the feature was not storage footprint reduction anyway – the original design goal was to reduce I/O throughput to the store so that the (bigger ?) goal of being able to use secondary storage for Exchange could be realized.

So, Store Compression actually only compresses the email headers and any text or html body text. This apparently gave sufficient reduction in the I/O to allow effective performance with secondary storage; it also gave a good balance of I/O optimization against CPU usage (for the overhead of compressing data).

This chart shows the kind of reductions that can achieved with MaX Compression (or any other method of compression attachments), even with the Store Compression feature of Exchange 2010 in action. The two products/features actually work hand in hand, each compression a different aspect of the email object.

More details of MaX Compression and Exchange 2010, how we tested, the results and conclusions can be found here or on the C2C Website.

GEO 51.4043197631836:-1.28760504722595
Subscribe to RSS Feed Follow me on Twitter!