Adsense

Wednesday, November 14, 2007

DNN Forums Upgrade - The type initializer for DotNetNuke.Modules.Forum.DataProvider

I was getting this error after trying to upgrade my DotNetNuke Forums module from a 3.* version to a 04.04.03. The error refers to a dll that is no longer valid from the old version. After spending some time trying to figure the error out, I ended up having to uninstall the old version and then install a fresh copy of the new version.

(WARNING - Unless you do some backing up and restoring of your Forums data, you will probably lose your existing posts. Keep this in mind.)

Anyone know of an easier way of getting the new version installed without having to uninstall the old one?

Monday, November 05, 2007

SQL Server 2005 Error - An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.

You may receive this error when trying to remotely connect to your SQL Server 2005 (or Express) database. (Even when connection remotely from a service running locally, such as an ASP.NET website.) The first thing to check is the most common cause of this error. You must enable Remote Connection manually to SQL Server 2005 installations because they are disabled by default. To do this, check the following.

Enable remote connections for SQL Server 2005

  1. Open the SQL Server Surface Area Configuration tool. (You can find this in your start menu under SQL Server 2005.)
  2. Expand "Database Engine"
  3. Click on "Remote Connections"
  4. Enable Remote Connections (TCP/IP, Named Pipes, or Both)
  5. Click on Service under "Database Engine" and Stop then Start your database for the changes to take affect.

Test your connection now. For most people this will be sufficient to correct the problem. In my case, my company is using a connection string that did not specify the port when connecting to the database. I had just reinstalled Microsoft SQL Server and received this error and didn't want to have to change anything in the project to get it working again. I found that I had to statically set it for the server to SQL Server's default value of 1433. To do this, perform the following.

Set the port to be used with TCP/IP connections

  1. Open the SQL Server Configuration Manager
  2. 2xpand SQL Server 2005 Network Configuration and select "Protocols for YOURDBSERVERNAME"
  3. Right click on "TCP/IP" on the right and choose properties
  4. Click on the "IP Addresses" tab
  5. Set the TCP Port property for the entry with IP Address "127.0.0.1" or any other that you need and click "Apply".

In our case, this fixed the problem and allowed us to use our connection string unmodified.