Xperimentality

Experiences and Experiments in Programming

 Wednesday, August 29, 2007

Well I completed the upgrade to DasBlog 2.0 this morning.  There was really only one hiccup and for the most part it was my fault.
If you don't know, about 2 weeks ago, DasBlog 2.0 was released.  So what you might say!  Well this release of DasBlog supports running on .NET 2.0 under Medium Trust.
I host my blog with GoDaddy so I have been holding off on going to .NET 2.0 on my hosting because DasBlog would not run.  It previously required Full Trust.  So as of this morning, I have been able to move all of my hosted stuff to .NET 2.0 and subsequently upgraded DasBlog to version 2.0.
I began by following the upgrade instructions located here on the DasBlog site.  I won't re-list all the steps here.  The basic idea is to download and unpack the DasBlog install files.  Copy down your web and site config files and your content directory from your existing installation to a local drive.  Merge the web and site config files with those in the new DasBlog install.  Run the DasBlogUpgrader.exe against your content directory.  Now here is where I had my first problem.  When I tested the upgrade in my test environment I got an error in the aspnet_wp.exe.  I checked my application log files and found that a duplicate key was trying to be inserted into the ASP.NET Cache.  The description of the error said

An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/1/Root/dasblog
Process ID: 4104
Exception: System.ArgumentException
Message: Item has already been added. Key in dictionary:
'9db86387-f712-4b43-be7d-d41d999a90d0' Key being added:
'9db86387-f712-4b43-be7d-d41d999a90d0'
...

I took a look in the content directory of my DasBlog install and noticed that there were 2 files for the same date.  I really don't know what caused the duplicate file to get created, but they appeared to be identical.  Deleting one of the sets of files fixed the problem.
So once I got everything running in the test environment I started the migration to the hosting server.  Again, the basic idea was replace most everything with the new files including the merged web and site config files and the content directory.  So here is where I ran into my second problem.  I uploaded everything and got an error when I tried to hit the blog.  In the System.Web section of the web.config file, there is an element which specifies the trust level.

<trust level="Medium" originUrl="" />

The problem is that GoDaddy specifies this in their machine.config file and also sets the attribute that tells ASP.NET to not allow a local site to override it.  So to fix the problem, just comment out this line in the web.config of the blog and inherit the setting value from the machine.config.
That was it!  I would consider that a pretty painless upgrade ( as a matter of fact, considering some of the nightmares I have experienced, I would even consider it pleasant! ).

Wednesday, August 29, 2007 10:15:26 AM (Central Standard Time, UTC-06:00)
Who Am I - Todd Miranda
Me
MVP Visual Developer - ASP/ASP.NET
Search
Links
On this page....
Calendar
<May 2019>
SunMonTueWedThuFriSat
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
Archives
Aggregate Me!
RSS 2.0 | Atom 1.0 | CDF
Categories
Blogroll
Contact me
Send mail to the author(s) E-mail
Administration