Right now this website is written in .NET and I’ve only recently decided to try to upgrade it. About 6 months ago, I did an upgrade which brought me from IIS 6 to IIS 7. I had to migrate my database to SQL Server 2005 to accommodate the upgrade but it worked. Behind the scenes, Go Daddy migrates your account to another box which is running Windows Server 2008 and IIS 7.
Now that I’m on IIS 7, I’d like to upgrade my .NET support to .NET 4.0. I recently bought a great book called C# 4.0 in a Nutshell: The Definitive Reference and after skimming through it, I’d like to start using some of the new .NET 4 features.
Go Daddy has full support for .NET framework 4, but only if it’s a Grid account. The Grid technology basically scales your website by copying the virtual directory content to other boxes and providing load balancing. It’s free to upgrade to a grid account, so here’s how you do it!
Sign into your Go Daddy account. In the “My Account” screen, pull up “Web Hosting” under your products. It should look like this:
In the above picture, you’ll notice I highlighted my account with a red box. Click that hyperlink (the part that has the box around it). It’ll bring up some billing options.
Once you click, it’ll pull up billing options that look like the above picture. Once that comes up, go to the “Edit Account Details” tab. Under the plan drop down, you’ll be able to change your account to a Grid account. Non-grid accounts are called classic.
Once that change is made, it’ll take some time for it to go through. When I changed to grid, it took about 2 hours to be processed. Behind the scenes, it’s copying your information over to a server built for the Grid technology.
Once you’re migrated, you’ll want to launch the Hosting Control Center (this is the product I work on). In the “My Account” screen, you can click the “Launch” button to bring up the control center:
Once this is up, you can click “Settings” and it’ll show the icons just like the picture above. To enable .NET 4, you’re going to want to click the icon “Add-On Languages”.
That will bring you to this screen. Here, simply pick “ASP 4.0″ and click “Continue”.
Problems I ran into (and what I did to fix them)
My upgrade didn’t happen without issue. The problems that came up were really easy to work through, though.
The first thing you’re going to want to check are your directory permissions. I noticed when I got migrated that it reset all of my writable directories (for example, logs).
After that, I had to work through 2 issues with IIS. First issue was that I was getting a 500 error. My web.config was still using the old IIS 6 way of displaying errors, so I had to update it to use the new IIS 7 way out outputting errors. Here’s what that looks like:
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
<customErrors mode="Off" />
<compilation debug="true" />
After that was done, I could see there was a problem with one of my custom http modules (I’m running my application in integrated pipeline mode). I wrote a simple module to work like Apache’s mod_redirect. It’s used to canonicalize my URLs to one final URL ( for example, brianclifton.com instead of brianclifton.com/ ). It also redirects old content.
I had to remove the module from the <system.web> section. I already had the new entry in <system.webServer> (I guess .NET 2/3/3.5 let both entries co-exist). Here’s what my new entry looks like:
<add name="UrlRedirector" preCondition="" type="BrianClifton.UrlRedirector"/>
After that change, the site loaded up great!
I only ran into one more problem, which happened when I was trying to write this article. Because I have to enter HTML into the blog entry, ASP.NET freaked out because it could have unsafe content in the text. Even though I had a page directive specifying ValidateRequest=”false”, I had to make another web.config entry under the <system.web> section…
<httpRuntime requestValidationMode="2.0" />
That did the trick and it’s been running great since!