As a slight diversion from the straightforward web design posts that I normally write - I am going to hit a technical one here! I have posted tweets on the Mediasmith UK Twitter page about a small virtualisation project with VMWare's ESXi 4.0, but for the technically minded (aka geeks!) here's the lowdown.
We have been running 2 servers for development for some time now. The original one, a HP ML350 Dual P3 1GHz with 2.1Gb RAM and 3 x 36.4Gb 10k hard drives has been suffering a little bit of late with some fairly hefty site rebuilding duties, resulting in a reboot each time the scripts have run, and so it was time to take some pressure off and put it all onto the new server. The new server incidentally is a HP ML150 G5 with a Xeon Quad-core 2GHz processor, 6Gb RAM and 3 x 146Gb 15k hard drives. For some reason it did ship with a low end RAID controller though which could only handle RAID 0 or RAID 1; meaning that for the past months it has only been running with 146Gb capacity and with a hot spare drive.
The first thing to do was fix this situation and I found a new HP Smart Array P800 RAID controller on eBay at a very reasonable price. After performing 2 backups (one online and one offline - you can never be too careful) of the data on the ML 150, I installed the new RAID beast. Beast being the operative word! I have never seen a RAID card come online so fast. Oh and one press of a button and it set up the RAID array in the correct manner. We now had 298Gb in a RAID 5 array, on a much more powerful controller - awesome.
Having been a little bit skeptical of this whole virtualisation malarky I had previously run a quick test on a HP ML115 which coped OK, and it seemed easy enough to set up using ESXi 4. I proceeded to setup ESXi on the ML150 and sure enough a few minutes later it was ready to install the virtual machines. One of the beauties of ESXi is that it allows you to set the number of cores available (if you have a multicore processor), the amount of RAM and disk space for each VM (Virtual Machine). This is in a free and easy to use package. My one gripe is the VMWare Go is still a bit hit and miss as to whether it will work correctly, and downloading vSphere from the ESXi server is a much more robust option to set the VMs up.
Firstly came the domain controller / file server. It doesn't require much power, but plenty of disk space. ESXi allows you to set this up. 1 core @ 2GHz, 2Gb RAM and 150Gb of disk space to be precise. Try buying a server with that oddball spec! The DC was up in no time with File server role added, and running way faster than the resources I had allowed it suggested it might. Then came the application server which is running ASP.NET, SQL Server 2008 and the 3CX phone system with the 3 cores, 4Gb RAM and 85Gb disk space. The application server is also a Certificate Server as one of our requirements for the virtualisation was to have an externally accessible server and a non-accessible one, with SSL connection to the accessible one. ESXi allowed us to do this. Both VMs are running exceptionally well, in fact better than might be expected of 2 physical machines of their specs. Moving forward we can now say that virtualisation will definitely be an option for some clients, depending on their current hardware, to support our web applications. And after looking at Hyper-V, I have to admit, although we love Microsoft, it's the VMWare product that holds the big cards. Quicker to install, a smaller footprint, a doddle to manage and still free - it is a fantastic product.
5c1be951-d932-4010-bb42-bdc47999ab5d|0|.0
As an ASP.NET developer you tend to come across all kinds of weird and wonderful anomalies; file or application permissions and incorrectly structured web.config files seem to be some of the most popular ones. However you see them once or twice and intuitively know how to fix them next time even if you have had to Google the problem originally. The chances are someone else has come across the problem before and fixed it but there are sometimes several fixes for the same problem and you sometimes see some that are a mile from what anyone else has found and wonder if they can really work. My experience shows that often the more out there ideas are the ones that you try last in desperation, more hoping than applying any belief that the solution will work.
One such case of 1000 answers to 1 error is my first attempt at an ASP.NET application in Windows 7. Sure the Microsoft site tells you all the wonderful things that you can do with Windows 7, SQL Server 2008 Express and ASP.NET running on IIS7. What it seems to fail to tell you is that Microsoft have chosen some rather strange configuration for the IIS7 default setup in Windows 7. I discovered this when I tried to run an ASP.NET application to test a client machine capability. The 1st error I encountered was a 500.19 error stating that my web.config file was incorrectly structured, but it could also be an application permisson error with the <handlers> tag highlighted in red. Incidentally the error code was 0x80070021. I found this post from Anil Ruia on the IIS forums site. It proved very useful. At first I simply followed his instructions but found I didn't have permission, so followed these steps:
- Ran Command Prompt as Administrator - go to Start, type in cmd in the search and right click cmd.exe that appears. Click Run as Administrator
- Navigated to the %windir%\\System32\\inetsrv folder - type cd %windir%/System32/inetsrv and press enter
- Ran the following command in command prompt - type appcmd unlock config -section:system.webServer/handlers and press enter. You should receive a message to say that the section is unlocked.
- Ran appconfig unlock config -section:system.webServer/modules - after solving the handlers problem I found that modules was locked too.
- I still faced a problem though in that IIS wasn't handling ASP.NET pages. I discovered that the default options when installing IIS (through Turn Windows Features On or Off in Control Panel --> Programs) didn't allow it to handle ASP.NET! Bizarre. I enabled this option and now everything works.
Here is a screenshot of the options that need to be selected. Now that I know this, the sensible option is to select this when installing IIS:

I can now go back to the client and run this on his machine to test the application performance. What a relief!
e94fbc7d-a5ca-49f1-bb32-6f6e70dfc5ca|6|5.0