Testing with Legacy Browsers
I like the dreams of the future better than the history of the past.Thomas Jefferson
Legacy support is a painful business. We've been working hard with a client to help them drag their estate of internal web apps kicking and screaming in the 20th century. This has come with a few caveats - namely that we've had to make sure that any updates support IE8!
The first and most obvious stumbling block we came across as a bug that slipped through testing and only manifested on the clients older installs which were natively running IE8 on Win 7. We had been testing using the integrated F12 tools in IE11.
Fortunately we work to a fortnightly release cadence so the problem was quickly spotted and squished but the question remained: how can we stop it happening again?
The solution for us was to run VM's on our development machines. This allows us to test the sites in the same conditions as a native browser without us having to resort to any hacks to get older IE versions running on our machines. We pulled our images from Modern.ie. Here you can get VM's dating as far back as IE6 on Win XP.
With a solution in hand development proceeded apace until we hit our second stumbling block. One of the apps we were upgrading used Windows Authentication against the clients AD Domain. The virtual machines we were using couldn't be connected to the Domain so we needed to ensure they could pass through credentials some other way.
To tackle this quandry we devised away of hosting the site on our development machines whilst allowing windows authentication to pass through to the domain. We did the following:
- Install IIS locally on the dev machine
- Add the site to IIS, ensure you add a host name binding
- Add hosts entries to the test machine for the hosted site
- On the hosting machine, fire up RegEdit and navigate to the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
- Add a new multi-string key called BackConnectionHostNames
- Add the binding for each host site to the key (i.e. clientsite.dev)
 This one deserves a little more explanation - get the IP for your hosting machine i.e. 18.104.22.168. Next in the hosts file on the testing machine (your VM) add an entry with the binding host you used in step 2 with the IP of the hosting machine. something like:
That's it, with this setup we have managed to get a VM communicating with a hosted site using windows authentication passing back through to the domain. The browser in the VM will ask for your credentials (as you aren't logged in with domain creds) but this gives us a chance to work on the site and view changes in the native browser in real time.
Find this post useful? Follow us on Twitter