Reputation: 2403
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?
Upvotes: 0
Views: 638
Reputation: 2403
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!
Upvotes: 1