| |
.gif) 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”

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
It seems that ‘Document Access’ from Outlook Web Access (OWA) is no longer supported in Exchange/OWA 2010. http://technet.microsoft.com/en-us/library/aa998911.aspx#Disc2007to2010 However, 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 ? GEO 51.4043502807617: -1.28752994537354
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 !!”
GEO 51.4043502807617: -1.28752994537354
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:\inetpub\wwwroot\pstdiscovery.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:\inetpub\wwwroot\pstdiscovery.mdb;"
Testing with this new connection string worked fine - problem solved….

GEO 51.4043502807617: -1.28752994537354
I 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
GEO 51.4043502807617: -1.28752994537354
Yesterday as I was trying to install Exchange 2007 on Windows 2008 R2 Enterprise Edition, I got a pretty strange issue. Everything 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. GEO 51.4043502807617: -1.28752994537354
It 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… GEO 51.4043502807617: -1.28752994537354
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. 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). 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.

GEO 51.4043197631836: -1.28760504722595
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… I 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
Disclaimer: Screenscraping results like this probably contravening Google’s Terms of Use (or something) and I do not advocate that you do it – this is purely hypothetical, if I did want to do it, this is how I would go about it  Further Disclaimer: The results page formats could change at any time and may well break this script, if that happens you are on your own (FireBug and some modified regex should help you out). So, if you wanted to get the Google ranking of a bunch of domains when searching for a particular term you could use one of the many SEO page ranking test sites that are available, but these are a pain in as much it they require you to enter the search term and the domain name you are looking for and they give you the ranking (what position in the results the domain name comes). that is fine for individual searches (like what position is kapie.com if I search on ‘Ken Hughes’), but not very good for doing a comparison of multiple domains against the search term. I looked at using Googles Search API to get this info, but unfortunately it only returns 4 or 8 results (it is mainly designed to present some brief results in a box on your website), what I needed was to look at a lot more results (like up to 500)…. Back to my trusty friend – PowerShell… I create a web client, have it download the first X (500) results to the search term, load the link Url and the position into a hashtable and then lookup the hashtable to find the rank position of each of the domain names I am looking for. It was actually pretty easy, the only difficult part was getting the regex(s) correct – Regex is evil, as evil as Perl…. Here is the script code : $domainNames = "google.com", "live.com", "bing.com", "yahoo.com"
$maxResult = 100
$searchTerm = "search"
$urlPattern = "<\s*a\s*[^>]*?href\s*=\s*[`"']*([^`"'>]+)[^>]*?>"
$hitPattern = "<\s*(h3)\sclass=r>(.*?)</\1>"
$wc = new-object "System.Net.WebClient"
$urlRegex = New-Object System.Text.RegularExpressions.Regex $urlPattern
$hitRegex = New-Object System.Text.RegularExpressions.Regex $hitPattern
$urls = @{}
$resultsIndex = 0
$count = 1
while($resultsIndex -lt $maxResults)
{
$inputText = $wc.DownloadString("http://www.google.com/search?q=$searchTerm&start=$resultsIndex")
"Parsing : " + $resultsIndex
$index = 0
while($index -lt $inputText.Length)
{
$match = $hitRegex.Match($inputText, $index)
if($match.Success -and $match.Length -gt 0)
{
$urlMatch = $urlRegex.Match($match.Value.ToString())
if(($urlMatch.Success) -and ($urlMatch.Length -gt 0))
{
$newKey = $urlMatch.Groups[1].Value.ToString()
if(!$urls.ContainsKey($newKey))
{
$urls.Add($newkey, $count)
}
$count++
}
$index = $match.Index + $match.Length
}
else
{
$index = $inputText.Length
}
}
$resultsIndex += 10
}
foreach($domain in $domainNames)
{
$maxPos = -1
foreach($key in $urls.Keys)
{
if($key.Contains($domain))
{
$pos = [int] $urls[$key]
if(($pos -lt $maxPos) -or ($maxPos = -1))
{
$maxPos = $pos
}
}
}
if($maxPos -eq -1)
{
$domain + " : Not Found"
}
else
{
$domain + " : Found at result #" + $maxPos
}
}
Drop me a line in the comments if you find it useful…
GEO 51.4043197631836: -1.28760504722595
Yesterday on Leon's Blog, secretGeek, I noticed they had released v3.4 of TimeSnapper. One of the features that caught my eye was the ability to develop/add plugins to it.
I love plugins, I've written plugins for Windows Live Writer, Outlook, dasBlog, and more. Everything should have an SDK or plugin'able architecture. I championed it at work and we were one of the first Archiving Vendors with a 'real' SDK (I've built demo Vista Gadgets, integration scripts, federated search providers and PowerShell commandlets for it).
Anyway, the TimeSnapper plugin model looked really clean and easy to use. Read the one page description and your ready to go (didn't even download the sample code - it was so clear how things worked there was no need).
I wanted a little play around with it, so I though upload a snapshot to TwitPic would be a good idea. Opening a new project in Visual Studio, adding a reference to the ITimeSnapperPlugin.dll, create a new inherited class from ITimeSnapperPlugin and implement the interface :
#region ITimeSnapperPlugin Members
bool ITimeSnapperPlugin.Configurable
{
get { return true; }
}
void ITimeSnapperPlugin.Configure()
{
System.Windows.Forms.Form frm = new TwitPicPluginConfig();
frm.ShowDialog();
}
string ITimeSnapperPlugin.Description
{
get { return "Uploads snapshots to TwitPic"; }
}
string ITimeSnapperPlugin.FriendlyName
{
get { return "TwitPic Plugin"; }
}
object ITimeSnapperPlugin.HandleEvent(TimeSnapperEvent TimeSnapperEvent, EventArgs args)
{
switch (TimeSnapperEvent)
{
case TimeSnapperEvent.SnapshotSaved :
// upload it it to TwitPic
if (IsTimeToUpload())
{
string fileName = ((TimeSnapperPluginAPI.SnapshotSavedEventArgs)(args)).Activity.Filename;
Debug.WriteLine("Uploading " + fileName + " to TwitPic");
XmlDocument xmlDoc = UploadToTwitPic(fileName);
}
break;
default :
Debug.Assert(false, "Should never occur");
break;
}
return null;
}
TimeSnapperMenuItem[] ITimeSnapperPlugin.MenuItems()
{
return null;
}
Guid ITimeSnapperPlugin.PluginID
{
get { return new Guid("50744334-C5A0-44f1-BE64-5BBF32FDA79D"); }
}
TimeSnapperEvent[] ITimeSnapperPlugin.SubscribesTo()
{
return new TimeSnapperEvent[] { TimeSnapperEvent.SnapshotSaved };
}
All that was required was to give it a new Guid and name/description and then subscribe to the 'SnapShotSaved' event and handle the event when it was triggered. To get the image uploaded to TwitPic I used some code from the excellent Yedda Twitter C# Library (just the stuff for posting image data to a url). That all worked a breeze, but it was sending images (and posting to my twitter account) every 10 seconds (and of course it was hard coded to my username/password) - what was needed was a bit of configuration...
Luckily the plugin model provides an excellent and easy way to do this (set the Configurable property to true, and handle the Configure event). A bit more jiggery pokery, one modal dialog and an XML config file later, it was all working (configurable username, password, twitter message and frequency of updates) - although I really should do something better than store the username/password in clear text in an XML file...
If you want the plugin, just drop this dll into your %install%\plugins folder and restart TimeSnapper.
GEO: 51.4043006896973 : -1.28754603862762
After upgrading to Windows 7 on my laptop I found that I could no longer sync with my Sony Ericsson X1 (Windows Mobile 6.1) Phone. It didn’t even seem to be charging (over USB). Looking in the system Device Manager I found a missing driver for the ‘Generic RNDIS’ device. A bit of goggling uncovered that this was something required for syncing mobile devices. Although there are comments around that Windows Mobile devices are not supported on Windows 7 beta, and a number of people seem to be having the same problem, the good news is it does actually work. I simply downloaded the Windows Mobile Device Center 6.1 for Vista (from Microsoft), installed it and everything was rosy. It installed the driver for the ‘Generic RNDIS’, I connected the phone, it was recognised a Microsoft USB Sync device was installed and it all started working as expected. GEO 51.4043694884482: -1.28756761550903
|
|
|
|
|
|