MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Invalid object name 'dbo.Language'  (Mono Support )

Viewed 13158 time(s), 2 post(s) 10/27/2012 9:01:45 PMby ClipFlairadmin3
ClipFlairadmin3

ClipFlairadmin3

10/27/2012 9:01:45 PM
When one tries to copy website files from a running MonoX installation into a new one (with a clean empty db), when they visit the site it says:

Invalid object name 'dbo.Language'. 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
'dbo.Language'.

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 'dbo.Language'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +356
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +364
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2640
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +88
System.Data.SqlClient.SqlDataReader.get_MetaData() +114
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +505
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1992
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +480
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +28
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +221
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +22
SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior) +109

[ORMQueryExecutionException: An exception was caught during the execution of a retrieval query: Invalid object name 'dbo.Language'.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.]
SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior) +710
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, Boolean allowDuplicates, IEntityFields2 fieldsUsedForQuery) +417
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) +1260
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, ExcludeIncludeFieldsList excludedIncludedFields, Int32 pageNumber, Int32 pageSize) +221
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath) +71
MonoSoftware.LLBLGen.Repository.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath) +91
MonoSoftware.MonoX.Repositories.LocalizationRepository.GetLanguageSettings() +275
MonoSoftware.MonoX.Utilities.LocalizationUtility.GetLanguageSettings() +139
MonoSoftware.MonoX.Utilities.LocalizationUtility.GetDefaultCultureName() +157
MonoSoftware.MonoX.Utilities.LocalizationUtility.GetLocalizationCultureName() +414
MonoSoftware.MonoX.Utilities.PageUtility.GetPageProperties(String appRelativeCurrentExecutionFilePath) +163
MonoSoftware.MonoX.BasePage.get_PageProperties() +40
MonoSoftware.MonoX.BasePage.OnPreInit(EventArgs e) +129
System.Web.UI.Page.PerformPreInit() +40
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1404


Seems the issue is at web.config where it says
<add key="InstallationDone" value="true"/>
and needs
<add key="InstallationDone" value="false"/>

but this is not obvious to the user from the exception message. So I'd prefer you were checking for this situation and showing a better exception message

Even better I'd expect to see a real page saying a suggestion to work arround that issue, since default is to show friendly error messages which don't show the exception message (the default is mode="On" in web.config instead of <customErrors mode="RemoteOnly" defaultRedirect="/MonoX/Pages/MonoX/Error.aspx"> that I prefer)

* btw, when I do open new topic at this support site, the title page changes to "Mono Support " from "Mono Support"
This content has not been rated yet. 
0 Reputation 3 Total posts
ClipFlairadmin3

ClipFlairadmin3

10/27/2012 9:03:47 PM
I was even trying to navigate directly to .../MonoX/Installer/Default.aspx but hadn't notice the above setting in web.config so it was redirecting to the root page which was failing with the above cryptic db error
This content has not been rated yet. 
0 Reputation 3 Total posts