Invalid object name 'be_Settings'.

Topics: ASP.NET 2.0
Aug 9, 2008 at 10:15 AM
Hi

I donwloaded BlogEngine version 1.4.5, upgraded to VS2008 and ran the project using XML with no problems.

Now I want to use SQL server 2005 as database and when I run the project on my local PC this is the error I get:
Invalid object name 'be_Settings'.

I have created the blog database on my SQL server and as far as I can see it is correct.

Does anyone know how to get this problem solved?

PS the entire error page is below

Thanks Torben

 

Server Error in '/BlogEngine.Web' Application.

Invalid object name 'be_Settings'.

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.Data.SqlClient.SqlException: Invalid object name 'be_Settings'.

Source Error:

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.

Stack Trace:

[SqlException (0x80131904): Invalid object name 'be_Settings'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
   System.Data.SqlClient.SqlDataReader.get_MetaData() +62
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.ExecuteReader() +9
   BlogEngine.Core.Providers.DbBlogProvider.LoadSettings() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Providers\DbBlogProvider.cs:1081
   BlogEngine.Core.Providers.BlogService.LoadSettings() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Providers\BlogService.cs:296
   BlogEngine.Core.BlogSettings.Load() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:1640
   BlogEngine.Core.BlogSettings..ctor() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:223
   BlogEngine.Core.BlogSettings.get_Instance() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:250
   BlogEngine.Core.Web.HttpModules.ReferrerModule..cctor() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Web\HttpModules\ReferrerModule.cs:81

[TypeInitializationException: The type initializer for 'BlogEngine.Core.Web.HttpModules.ReferrerModule' threw an exception.]

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +268
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
   System.Web.Configuration.Common.ModulesEntry.Create() +41
   System.Web.Configuration.HttpModulesSection.CreateModules() +203
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +1006
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +259
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +114
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350


Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
<!-- [SqlException]: Invalid object name 'be_Settings'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader() at BlogEngine.Core.Providers.DbBlogProvider.LoadSettings() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Providers\DbBlogProvider.cs:line 1081 at BlogEngine.Core.Providers.BlogService.LoadSettings() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Providers\BlogService.cs:line 296 at BlogEngine.Core.BlogSettings.Load() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:line 1640 at BlogEngine.Core.BlogSettings..ctor() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:line 223 at BlogEngine.Core.BlogSettings.get_Instance() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:line 250 at BlogEngine.Core.Web.HttpModules.ReferrerModule..cctor() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Web\HttpModules\ReferrerModule.cs:line 81 [TypeInitializationException]: The type initializer for 'BlogEngine.Core.Web.HttpModules.ReferrerModule' threw an exception. [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Web.Configuration.Common.ModulesEntry.Create() at System.Web.Configuration.HttpModulesSection.CreateModules() at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) -->
Aug 9, 2008 at 5:50 PM

Hi,

Have you checked that the beUser is there and has the permissions to see the BE tables in your DB?   

Aug 10, 2008 at 10:27 AM

Yes it is a developer administrator login to the sql database server

 

Torben

 

Aug 10, 2008 at 11:19 AM
Problem solved!
I managed to misspell the name of the database

It is running fine now

Torben
Apr 18, 2009 at 1:55 AM
I have 1.4.5 running on my local machine against SQL Server 2005. however, when I deploy to production I am getting:

Invalid object name 'be_Settings'

I have the database spelled correctly and have admin access to the production database. Has anyone any ideas?
Apr 18, 2009 at 2:04 AM
Update: why am I seeing details of Mads' machine in the error message?

System.Data.Common.DbCommand.ExecuteReader() +12

   BlogEngine.Core.Providers.DbBlogProvider.LoadSettings() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\Providers\DbBlogProvider.cs:1081

   BlogEngine.Core.BlogSettings.Load() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:1640

   BlogEngine.Core.BlogSettings..ctor() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:223

   BlogEngine.Core.BlogSettings.get_Instance() in C:\Documents and Settings\Mads Kristensen\Dokumenter\Visual Studio 2005\Projects\BlogEngine.NET\DotNetSlave.BusinessLogic\BlogSettings.cs:250


Apr 18, 2009 at 2:24 AM
I solved the problem. I ran the original DB script again on the production database but that didn't fix it.

So, I re-deployed the website and it worked. I can only guess that the Web.Config was not successfully deployed the first time :-)