Configure Visual Studio 2012 to use 64 bit version of IIS Express

By default Visual Studio (as a x86/32bit process) will always launch the 32bit version of IIS Express. If you have components that specifically require running under 64bit, you can can configure Visual Studio 2012 to use IIS Express x64 version by setting the following registry key: reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\WebProjects /v Use64BitIISExpress /t REG_DWORD /d 1 You should note that this… Read more “Configure Visual Studio 2012 to use 64 bit version of IIS Express”

Cisco VPN Client for Windows 8

There isn’t currently a version of Cisco’s VPN client that supports Windows 8, and after installation I received an error message complaining that the “VPN Client failed to enable virtual adapter.”. Fortunately, there is a way to get this “legacy” VPN client to work, with a small registry change: Open up the registry editor by typing regedit in Run prompt… Read more “Cisco VPN Client for Windows 8”

Disabling Chrome’s Metro app in Windows 8

At time of writing, if you replace IE with Chrome on Windows 8 then Chrome installs both a desktop and a Metro version of itself. Personally, as most of my time is spent in the desktop, I’d rather Chrome just always opened there. There’s currently an open issue on the chromium website, but in the meantime there’s a relatively simple… Read more “Disabling Chrome’s Metro app in Windows 8”

MSDTC gotcha’s with Virtual Machines

Setting up some new infrastructure with a web and seperate db tier, I was hit with the usual MSDTC woes. Error messages progressed bit by bit as I opened things up: Attempt #1: The partner transaction manager has disabled its support for remote/network transactions. Attempt #2: Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for… Read more “MSDTC gotcha’s with Virtual Machines”

Migrating old websites & Rewrite maps in IIS 7

If you’re migrating to a new website and need to map old IDs to new IDs, I’ve just discovered that the UrlRewrite plugin in IIS has a great feature I hadn’t come across before called rewriteMaps. This means instead of writing a whole bunch of indentical looking rewrite rules, you can write one – and then simply list the ID… Read more “Migrating old websites & Rewrite maps in IIS 7”

Debugging Powershell and Psake commands and parameters

Getting commands and parameters in Powershell and Psake can be pretty troublesome at times. The echoargs helper from the PowerShell Community Extensions can be a lifesaver. If, for instance, you are calling msbuild.exe /t:Build /p:SomeTroublesomeParametersHere if you swap msbuild for echoargs (after placing the extensions in C:\Windows\System32\WindowsPowerShell\v1.0\Modules and callingĀ Import-ModuleĀ pscx), then you’ll see the exact parameters being passed to… Read more “Debugging Powershell and Psake commands and parameters”

Determining if an assembly is x64 or x86

After encountering a strange deployment issue today, eventually it was tracked down to an x86 assembly being deployed to a x64 process. There’s a tool included with Visual Studio called corflags that was helpful here. Open up a Visual Studio command prompt, type corflags.exe assemblyname.dll and you’ll see something like this: Version : v4.0.20926 CLR Header: 2.5 PE : PE32… Read more “Determining if an assembly is x64 or x86”

Unblocking downloaded DLLs

I find myself regularly forgetting to unblock zip files of various projects (when I’m not using NuGet) and then getting .NET errors around untrusted assemblies. To bulk unblock all files in a directory, simply Download the SysInternals “Streams” utility. Then open a command prompt in the directory you want to fix up, and use the “-d” parameter: streams -d *.dll… Read more “Unblocking downloaded DLLs”

NServiceBus audit queues

Being new to the world of NServiceBus, I just thought I’d share a few gotcha’s as I experience them. When everything’s up and running there’s no easy way to see what’s going on as messages appear and disappear from the normal message queue very quickly. You can use an audit queue to log all messages appearing on a queue. To… Read more “NServiceBus audit queues”

Deploying windows services using MsDeploy

Running MsDeploy is awesome for automated deployments of websites, but it’s also possible to use it to deploy other applications to the file system – such as associated windows services. You just need to jump through a few more hoops to get things up and running. I’m using TeamCity for our integration server, but the basic steps will work regardless… Read more “Deploying windows services using MsDeploy”

Saving thumbnails in the original file format with C#

I tripped up on a strange quirk working with the Image and ImageFormat classes recently. The intention was simple – load an Image object from an existing graphic, generate a thumbnail, and save it out in the original format. The Image class in .NET includes a handy “RawFormat” property indicating the correct format to save out in. So far, so… Read more “Saving thumbnails in the original file format with C#”