Recently
Archives
Links
Reading
Listening
Fixing GoDaddy
Wednesday, February 21, 2007
OK, another boring post.

GoDaddy is who we use for our hosting, and for the most part they've been cheap AND reliable.

For some reason, however, on February 20th, 2007 the bottom fell out of the custom applications I had written in ASP.NET 2.0, each of which used ODBC to connect to the MySQL databases provided by GoDaddy. I kept getting the following nasty error every 5 queries or so:

ERROR [HYT00] [MySQL][ODBC 3.51 Driver][mysqld-4.0.27-max-log]MySQL server has gone away

After scouring the internet and wasting three seperate tech calls with GoDaddy, I finally figured out what the deal was.

Apparently something changed (I suspect via Windows Updates on their servers) which broke ODBC's ability to maintain connections with MySQL. I finally tried the MySQL Connector for .NET and it completely fixed the problem with very minimal changed to my code. The MySQL connector has to be recompiled in order to get it to work with GoDaddy's server. Here's instructions I found from here:


Well, I tested it and sure enough, it works now. So thanks again to Alek and the Godaddy Hosting Team for taking the time to add support for the MySql Connector/Net provider under .NET 2.0.

As mentioned, I did have to place the recompiled assembly in the /bin folder to get it to work, but that is easy to do. For those who haven't already done so or haven't read about it elsewhere, this is how I recompiled the MySql.Data.Dll assembly.

I first downloaded the Connector/NET 1.0 provider from the MySql site: http://dev.mysql.com/downloads/connector/net/1.0.html

The Connector/NET provider (binaries and source code) were installed to the following location on my hard drive: C:\Program Files\MySQL\MySQL Connector Net 1.0.7

I then went into the \src folder and noticed they provide you with solution (.sln) and project (.csproj) files for Visual Studio, so I downloaded the free version of MS Visual C# 2005 Express Edition at: http://msdn.microsoft.com/vstudio/express/visualcsharp/default.aspx

I opened the solution file with Visual Studio C# 2005 Express (I think VS did some conversion to the solution to open it in the new version, no biggy) and simply added the following to the AssemblyInfo.cs file:

using System.Security; // I added this after at the end of the 'using' section

[assembly: AllowPartiallyTrustedCallers()] // I added this at the end of the 'assembly' section

Clicked 'Build'->'Build Solution' and voila, it built the new assembly.

I located the new .dll file in the C:\Program Files\MySQL\MySQL Connector Net 1.0.7\src\bin\net-1.1\Release folder. I know it recompiled it to the 'net-1.1' under \bin, but I don't think that matters - it seems to work for .NET 2.0 as well. If somebody knows differently, please let me know - I didn't see anywhere within VS Studio to change the compile for 2.0 specifically...

Anyway, I placed this recompiled MySql.Data.Dll in the /bin folder on my website and everything seems to be working now. I didn't have to change anything in my web.config file, just used the connection string Godaddy provided to me and tested a few queries, everything is working as it should now.


Once I referenced this freshly compiled .dll in my project, I simply replaced any references to System.Data.Odbc.Odbc with MySql.Data.MySqlclient.MySql, and compiled my project. Problem solved.

Again, not very interesting reading material, but I spent some good time on this and decided to share with the world.
Fixing Vista
For all of you who read my blog for the good stuff, I apologize that there hasn't been much of that lately. In the mean time, here's some boring stuff.

Vista has proved to be a much more likable OS than I originally evaluated. Once UAC is turned off, it runs without the annoying pop-ups, and contrary to the Mac ad, the important pop-ups still come up. That being said there are still some things I've had to do to get the thing running correctly. One of them is getting Flash to work.

Because I was upgrading, I already had Flash 9 installed. In IE7, however, none of the flash stuff was playing. The weirdest thing was that everything worked fine in Firefox. Long story short, the way to fix this is to go to Adobe's website and download a Windows uninstaller for Flash (http://www.adobe.com/support/flashplayer/downloads.html#uninstaller). Once you run the uninstaller, go back to the Flash website and run the Flash install again. Voila! Problem solved.

Sorry this is minutia and probably doesn't seem very blog worthy, but I spent a good amount of time researching this problem and I felt it was worth while to share.
The Vista From Here
Friday, February 02, 2007
There is now conclusive evidence to the fact that I am a masochist: I just upgraded to Windows Vista.



Before you write me off as a complete moron, here were my justifications/explanations at the time:

  • I took a backup image of my hard drive, so I can always go back.

  • I am the Systems Administrator, and I need to do some beta testing.

  • I am a complete sucker for eye candy and novelty.



What I forgot to account for was the fact that I am an inexorable force once I get my mind stuck on something. I have pounded away since Tuesday at this, and "going back" is not an option. Out of fear that my struggles might be in vain, I have decided to share my victories (few though they be) so that should any of you brave souls endeavor to follow suit, you will be armed with the wisdom gleaned from my mistakes.

Victory #1
I have gained this glowing pearl of wisdom: DO NOT UPGRADE FROM XP. The trouble of hunting down all those CDs and setup files is NOTHING compared to the hell of wrestling your computer into a state of functionality. If you do decide to upgrade for some ungodly reason, BE SURE TO TAKE A FULL BACKUP OF YOUR HARDDRIVE. I fully recommend Acronis True Image 10 for this task.

Victory #2
The first thing I noticed when I booted up was that Internet Explorer 7 hangs and then crashes. To fix this, hit escape when you open IE7 to stop it from loading. Go to Tools->Internet Options, go to the Security tab and uncheck "Enable Protected Mode." Not sure what protected mode buys you. It bought me a pile of doo doo.

Victory #3
Every bloody time I tried to move or delete a file, or even run a program, I got an incredibly annoying series of warnings. Save yourself precious time and click on the Control Panel->User Accounts. Click on "Turn User Account Control on or off," and uncheck "Use User Account Control." TRUST ME.

Victory #4
For some unholy reason my sound card started getting all crackly and staticy whenever Windows tried to play a sound. WARNING: this is a symptom of the fact that you are not running the correct sound card driver, and this will result in the Blue Screen of Death. To fix this you need to download and install a Vista friendly driver. At work I'm running a Dell, so I typed in my service tag and downloaded all the drivers off their site for Vista.

Some random observations:
The sidebar is a mockery of something useful. I mean COME ON! How hard is it to have a Quick Launch toolbar on your sidebar? Apparently it is impossible. There is an "App Launcher" gadget, but if you keep a collection of shortcuts in a folder which you then drag and drop onto the App Launcher, they look like trash and the stupid shortcut arrow takes up half of the icon space. Ugly and useless.

Aero is pretty nice. It can almost be too kitschy(sp?) at times, but it's definitely a huge improvement over XP's interface.

ReadyBoost is really sweet (it allows you to stick a USB drive into your computer and use it as extra RAM), but don't think that just because you have a USB 2.0 drive that it is qualified to be used for ReadyBoost. I have a Cruzer Mini 1GB and it works great. I have a Memorex TravelDrive 1GB and it does not pass the test to be used for RAM.

Overall
Once the turbulence of upgrading has been passed over, I feel like Vista will be a significant improvement over XP. The problem is I felt like I was relying on my Tech Bench skillz to even get the thing to work. If you are not tech savvy, DO NOT ATTEMPT to upgrade. You might can get away with a clean format/install, but remember to download Vista friendly drivers as soon as you can or else you'll be in a BSD inferno.