Umbraco 6 – Stuck at “Connecting to Database…” 5% Complete when using IIS 7.5 & MySQL (5.5)

My first entry into ASP.NET

Recently I built myself a nice IIS farm using a Dell PowerEdge 2950 GII server along with VMWare ESXi. Once I got the farm all configured properly and working well, I figured I would take some time to play around with ASP.NET as I have never touched it even after all this time in Windows environments.

I am pretty familiar with the PHP based offerings like WordPress, Joomla and Drupal. I also wanted something that would preferably run on MySQL since I already had 2 MySQL Servers available. I quickly found DotNetNuke and Umbraco were 2 of the more popular ASP CMS’s, but DNN only had support for MS SQL from what I understand, so Umbraco was the one for me.

Server setup

All of the servers are running Windows Server 2008 R2 and the configuration is as follows:

  • 2 IIS 7.5/ARR Servers w/ NLB (The load balancers)
  • 2 IIS 7.5 Web Servers w/ ASP 4.0 & PHP 5.4 (via Fast-CGI)
  • 2 MySQL 5.6 Servers (Master + Slave)

The Issue

I went with the manual installation of Umbraco and unpacked it into its own directory along with its own site on an existing (known good) web server. The database was then created using phpMyAdmin along with a new user for that DB on a known good MySQL Server. I have already demoed a few PHP CMS’s on this same server, so I knew all my connections, firewall rules and everything else should be working other than maybe some ASP.NET specifics. I added my DNS entry and browsed over to the site to be greeted by the Umbraco installer. Sweet, all down hill from here, right? A few pages later it prompts for the database specifics, which I thought was nice rather than having to find it inside of a configuration file.

Umbraco Database Config Screen

Umbraco Database Config Screen

The issue I ran into right after that screen is what stumped me for a little while. The setup would get stuck at “Connecting to database…” at 5%, the install would just sit there with no errors.

Umbraco - Connecting to database

Umbraco – Connecting to database

Upon researching the issue I seen 3 main suggestions that came up for similar issues on the Umbraco forums. First the database and/or credentials, but this was a new DB and the credentials were good. Second was permissions on the web root, the app pool will need read and write. Lastly, vague references that something could be wrong with the web.config.

After messing around with it for a little bit I realized if I entered completely fake information for the DB connection, I got the exact same result as entering my valid information. So basically at this point the web server is not even hitting the database server and it doesn’t seem to be timing out for whatever reason. After checking out the web.config at the Umbraco root I found this entry:

<system.data>
<DbProviderFactories>

     <remove invariant=”System.Data.SqlServerCe.4.0″/>

          <add name=”Microsoft SQL Server Compact Data Provider 4.0″ invariant=”System.Data.SqlServerCe.4.0″ description=”.NET Framework Data Provider for Microsoft SQL Server Compact” type=”System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91″ />

     <remove invariant=”MySql.Data.MySqlClient”/>

          <add name=”MySQL Data Provider” invariant=”MySql.Data.MySqlClient” description=”.Net Framework Data Provider for MySQL” type=”MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d” />

</DbProviderFactories>
</system.data>

I removed the section in high lighted in bold from my web.config and saved it. I then relaunched the site in a browser and tried it out using the same database and username I had created earlier. Upon entering the info and submitting the database was almost instantaneously created and the success page was shown.

Oddly enough I tried to recreate the issue after my first successful attempt and could not replicate the issue.

Comments are closed.