Last post Jan 18, 2006 10:32 AM by greenMenace
Jun 06, 2005 06:28 PM|jerdev|LINK
The Assembly Version ( [ASSEMBLYVERSION] ) does not match the Database Version ( [DATABASEVERSION] )
ERROR: Could not connect to database.
Object reference not set to an instance of an object.
This occurred on a system that had been working for several months. Someone opened the solution in VS, removed and re-added the core DotNetNuke project, and then this error came up. I have verified that the database connection information in web.config is
correct and that I can connect to the database from that particular web server. The dnn.config and Version table entries match up. This site is built on DNN 3.0.13.
At one point, I restarted IIS and received this error:
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.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[NullReferenceException: Object reference not set to an instance of an object.]
DotNetNuke.Services.Log.EventLog.XMLLoggingProvider.AddLog(LogInfo objLogInfo) in C:\Inetpub\wwwroot\DotNetNuke_3.0.11\Providers\LoggingProviders\XMLLoggingProvider\XMLLoggingProvider.vb:77
DotNetNuke.Services.Log.EventLog.LogController.AddLog(LogInfo objLogInfo) +148
DotNetNuke.Services.Log.EventLog.ExceptionLogController.AddLog(Exception objException, ExceptionLogType LogType) +1837
DotNetNuke.Services.Exceptions.Exceptions.LogException(Exception exc) +26
DotNetNuke.Framework.Reflection.CreateObject(String TypeName, String CacheKey) +136
DotNetNuke.Framework.Reflection.CreateObject(String ObjectProviderType, String ObjectNamespace, String ObjectAssemblyName) +295
[TypeInitializationException: The type initializer for "DotNetNuke.Data.DataProvider" threw an exception.]
DotNetNuke.Common.Global.Application_Start(Object Sender, EventArgs E) +324
I refreshed the page and it went back to the other error. The odd thing about this is that the file referenced in C:\inetpub\wwwroot doesn't exist on the web server. However, I could not find a reference to it anywhere in the solution.
Jun 06, 2005 07:42 PM|hooligannes97|LINK
Jun 07, 2005 09:41 AM|jerdev|LINK
Jun 07, 2005 11:39 AM|PurpleBox|LINK
Jun 08, 2005 02:23 PM|jerdev|LINK
Jun 08, 2005 02:30 PM|hooligannes97|LINK
Yes, I tried that first. I have no problems connecting with those credentials. And the web.config has not been changed from the time when it was working.
Jan 18, 2006 10:32 AM|greenMenace|LINK
I have experienced exactly the same problem but I am not sure if this was due to the same reason. I had an older backup of our website and ran a binary comparison against the LIVE files and it transpired that 5 files had been corrupted. I am not sure how
they became corrupt but managed to resolve it by copying the following file back to the LIVE server:
incidentally the other 4 files were:
Hope this helps.
This was on DNN 4.0 (running on .NET 2.0 with SQL Server 2005)