0
votes

I'm getting the following error when attempting to run DotNetNuke 7.1 from IIS.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: Line 572: //first call GetProviderPath - this insures that the Database is Initialised correctly
Line 573: //and also generates the appropriate error message if it cannot be initialised correctly
Line 574: string strMessage = DataProvider.Instance().GetProviderPath();
Line 575: //get current database version from DB
Line 576: if (!strMessage.StartsWith("ERROR:"))

I've tried running it from Visual Studio 2012 after downloading and extracting the source code to a folder, then running, but I get the same error (also, VS loads about 13 instances of it's built in webserver which can't be correct).

Clearly, there is something wrong with the database. From what I've read in the past, there should have been a start up configuration page (for configuring settings the first time you run the project).

I did look at the local version of IIS (running on Windows 8) and it created the site fine there, however, for some reason the internal webserver attempts to run (and the option to run on an external IIS is greyed out).

Anyone run into this problem with DNN Community edition? I've tried running as admin and setting permissions with no luck at all.

Any way to fix this?

screen capture

1
I'm suspecting that the file under App_Data called "Database.mdf" was the culprit. I get the error message "The database file is not compatible with the current instance of SQL" when I try to edit or click on it. I loaded it into SQL2012 on another machine to find it is just an empty database. I will try to load the SQL2012 express version on the dev machine. - MC9000
Installing SQL2012 Express doesn't help VS2012 read the file (which I presumed that would not work, but tried anyway). I found 4 locations for connection strings, so I created a new empty database and user, changed all 4 connection strings (the docs incorrectly state that the connection strings are in the web.config file - they are actually in release.config and development.config). I'm renaming the config file now to see if this works.... - MC9000

1 Answers

1
votes

Ok, the key is to delete the Database.mdf file completely. Then create a new empty database of your choice in SQL Server (2008 or greater). Create a new user account with db_owner access (as it must be able to create tables, etc). Change the connection strings in the release.config and development.config to connect to the database. DELETE the web.config file. RENAME either config file to "web.config" Set the default project to the web project in VS set the default page to default.aspx Run

I made the erroneous assumption that running the app would rename the config file for me (not sure why I assumed that). SOLVED!