YAFLogo

RoutineTravel
2 years ago
I am attempting to set up YAF as a standalone forum from the source code for the first time on my local machine. (In due course we want to integrate it into an existing web app, but I wanted to try to get it running on its own first.) I downloaded the latest version from GitHub last week and have followed the instructions at https://github.com/YAFNET/YAFNET/wiki/Installation .

I've had a couple of errors already in Visual Studio: first there were some .js files present in the project and missing on disk, so I removed these from the project and that seemed to be ok. Then there were errors relating to a particular assembly not being "strongly named", which I resolved by turning "signing" on for every assembly using the supplied .snk file.

I have created an empty database and verified that the app can connect to it. But when I go to /install/default.aspx for the first time it throws an exception with the error: Invalid object name 'yaf_Registry'

Debugging shows this is happening when
this.LoadBoardSettingsFromDB();
is called in LoadBoardSettings.cs line 68. But my understanding is that if the forum has not already been set up then the app should create the requisite tables in the database on first run. Is that right? Or is there a script somewhere that I should be running first to populate the database?

Thanks.
Sponsor

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
2 years ago
Normally the installer should detect that no version is installed. Atleast with the Latest version 2.31.7. I can not reproduce the issue.

Can you post the full excecption?
RoutineTravel
2 years ago
The exception is as follows:

Server Error in '/' Application.
Invalid object name 'yaf_Registry'.
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 'yaf_Registry'.

Source Error:


Line 46: public IDataReader ExecuteReader()
Line 47: {
Line 48: return dbCmd.ExecuteReader();
Line 49: }
Line 50:

Source File: C:\Projects\YAF2\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteCommand.cs Line: 48

Stack Trace:


[SqlException (0x80131904): Invalid object name 'yaf_Registry'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3318656
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +334
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4289
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +89
System.Data.SqlClient.SqlDataReader.get_MetaData() +101
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +624
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +3392
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +725
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +84
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +312
ServiceStack.OrmLite.OrmLiteCommand.ExecuteReader() in C:\Projects\YAF2\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteCommand.cs:48
ServiceStack.OrmLite.OrmLiteReadCommandExtensions.ExecReader(IDbCommand dbCmd, String sql) in C:\Projects\YAF2\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteReadCommandExtensions.cs:42
ServiceStack.OrmLite.OrmLiteResultsFilterExtensions.ExprConvertToList(IDbCommand dbCmd, String sql, IEnumerable`1 sqlParams, HashSet`1 onlyFields) in C:\Projects\YAF2\yafsrc\ServiceStack\ServiceStack.OrmLite\OrmLiteResultsFilterExtensions.cs:146
ServiceStack.OrmLite.ReadExpressionCommandExtensions.Select(IDbCommand dbCmd, Expression`1 predicate) in C:\Projects\YAF2\yafsrc\ServiceStack\ServiceStack.OrmLite\Expressions\ReadExpressionCommandExtensions.cs:24
ServiceStack.OrmLite.<>c__DisplayClass27_0`1.