Battle with Vista

I used to do all my software development (amongst other things) on my trusty HP laptop. It wasn’t what you’d call a normal laptop. It had 2 gigabytes of RAM and a fast dual core Intel processor. I also had a docking station for it so I could use my lovely Hyundia W240D LCD display and my normal desktop keyboard and mouse. So for all intents and purposes it was a desktop replacement. That is, apart from the speed of the thing, especially when it came to the day-to-day use I put it to as a development machine for working on a large ASP.NET and ASP website project. It seemed to me as a long time builder of my own PCs that the bottleneck was the disk subsystem. For all the right reasons, well one, my laptop was specified with 5400 rpm hard drives. In a laptop that’s a good choice as 7200 rpm hard drives are typically much noisier.

So, I made the decision to build myself a new uber-computer. But me being me, I took it a step further. So, here I am writing this on a completely silent PC. I say silent, but in actual fact it’s not silent, I just can’t hear it. Since I already had a number of devices mounted in a home-built rack, I decided to put my new machine in there and run cabling to my office. All I needed was a DVI lead, USB and an audio extension lead. Anyway, I’ve already detailed the actual build in another web page. This post is about my epic struggle to get vista to a point where I could use it to develop software.

I have decided to gather all my solutions to various problems that stood in my way, both as a future reference and in the hope that it my spare some poor soul from the same stress that I had to go through!

Website Projects/Solutions under Visual Studio 2008

When working with a website in Visual Studio 2008, it needs to be run with elevated privileges. This can be done in a number of different ways, first a temporary solution …..

  • Right-click the shortcut in the Start Menu
  • Select “Run as Administrator”

A permanent solution …

  • Right-click the shortcut
  • Select “Properties”
  • Select the “Shortcut” tab
  • Click the “Advanced” button
  • Tick the “Run as administrator” box
  • Click the “OK” button on both dialogs

There are other ways, such as enabling the administrator account and using that. But the two above ways keep the UAC intact.

Event Logs

Vista is locked down in terms of Event Logs, but there is only a problem when trying to create a new Event Log Source. This is easily solved by manually creating the required Source(s). This is achieved by a little regedit use.

Within the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEventLog key there should be a key for each log.

To create the log …

  • Right-click the EventLog key
  • Select “New” – “Key”
  • Enter the name of your log
  • Press <Enter>

To create the sources …

  • Right-click the HKLMSYSTEMCurrentControlSetServicesEventLog<log name> key
  • Select “New” – “Key”
  • Enter the name of the Source
  • Press <Enter>

Enable ASP Error Messages

By default IIS7 doesn’t send ASP error messages to the browser. Obviously, for development purposes, these are very useful. So, to enable them …

  • Load the IIS Manager
  • Navigate to your website
  • In the “Features View”, double-click the “ASP” icon within the “IIS” section.
  • Open up the “Compilation” section
  • Open up the “Debugging Properties” section
  • Set the “Send Errors To Browser” property to “True”

Enable ASP Parent Path References

In order for ASP to refer to parent folders …

  • Load the IIS Manager
  • Navigate to your website
  • In the “Features View”, double-click the “ASP” icon within the “IIS” section.
  • Open up the “Behavior” section
  • Set the “Enable Parent Paths” property to “True”

Enable ActiveX Controls

ActiveX controls can only be used in 32-bit mode. So, if your website makes use of them you will need to change your website to run as a 32-bit application. To do this …

  • Load the IIS Manager
  • Navigate to the “Application Pools” section
  • Right-click your website’s application pool
  • Select “Advanced Settings…”
  • Open up the “General” section
  • Set the “Enable 32-Bit Applications” property to “True”

Javascript error – ‘Telerik’ is undefined

This one is specific to using Telerik controls. Add the following to the web.config file in the <system.webserver> <handlers> section

<add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" />

This is by now means an exhaustive list, it’s just a small collection of the things I needed to fight my way through before I could use my machine in anger as a development workstation.

Javascript error when using Microsoft ReportViewer control

This is similar to the above in that it needed the following adding to the web.config file in the <system.webserver> <handlers> section

<add name="Reserved-ReportViewerWebControl-axd" path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/></pre>

The solution was found here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s