YAFLogo

seattleyeehaw
14 years ago
Hi there. I hope someone can help me, I'm really new to all of this custom forum stuff.

Using 1.9.4 and ASP.NET 2.0 (through godaddy)

We got everything installed and up and running and it has been working fine for weeks. Then tonight we were doing a couple of test posts, lots of refreshing and editing of 2 posts. I also changed one users' "user roles" to have none checked.

Now we can't access the forum at all. We are met with this message:

Server Error in '/forums' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

Any idea where to start looking? I was thinking about going through where the user roles are assigned and changing them back by hand, but I can't figure out what file those are saved in. Any assistance (as dumbed down as you can make it) would be soooo appreciated.

Sponsor
seattleyeehaw
14 years ago
Dug this out of the Database event log...

"Failure Initializing User/Page."

Followed by this:

System.ApplicationException: Failed to find guest user. at YAF.Classes.Core.UserPageBase.InitUserAndPage()

And this is the error logged before that one...

System.ApplicationException: Sql Exception with error number 2627 (Tries=0) ---> System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_yaf_Active'.

Cannot insert duplicate key in object 'dbo.yaf_Active'. The statement has been terminated. 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.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.

Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) at YAF.Classes.Data.YafDBAccess.GetDatasetBasic(SqlCommand cmd, Boolean transaction) at

YAF.Classes.Data.YafDBAccess.GetData(SqlCommand cmd, Boolean transaction) at YAF.Classes.Data.DB.pageload(Object sessionID, Object boardID, Object userKey, Object ip, Object location,

Object forumPage, Object browser, Object platform, Object categoryID, Object forumID, Object topicID, Object messageID, Object donttrack) ---

End of inner exception stack trace --- at YAF.Classes.Data.DB.pageload(Object sessionID, Object boardID, Object userKey, Object ip, Object location, Object forumPage, Object browser,

Object platform, Object categoryID, Object forumID, Object topicID, Object messageID, Object donttrack) at YAF.Classes.Core.UserPageBase.InitUserAndPage()

:(

seattleyeehaw
14 years ago
Solved it on my own. Somehow my "guest" usergroup got nuked. Which is why no one could access the forum at all (since everyone is tagged as a guest upon first arriving).

I went into the sql database and manually assigned the guest user ID 1, to usergroup 2.

Ta da.