YAFLogo

jax
  • jax
  • 78.8% (Friendly)
  • YAF Lover Topic Starter
14 years ago
Hey all,

I've just got my YAF 1.9.4 forum up and running but I get this error when trying to create a user. Any ideas?

Server Error in '/' Application.

Cannot insert the value NULL into column 'UserID', table 'yaf_wannaskim.dbo.yaf_prov_RoleMembership'; column does not allow nulls. INSERT fails.

The statement has been terminated.

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: Cannot insert the value NULL into column 'UserID', table 'yaf_wannaskim.dbo.yaf_prov_RoleMembership'; column does not allow nulls. INSERT fails.

The statement has been terminated.

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): Cannot insert the value NULL into column 'UserID', table 'yaf_wannaskim.dbo.yaf_prov_RoleMembership'; column does not allow nulls. INSERT fails.

The statement has been terminated.]

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1953274

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849707

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392

System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204

System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162

System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175

System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137

YAF.Classes.Data.YafDBAccess.ExecuteNonQuery(SqlCommand cmd, Boolean transaction) +138

YAF.Classes.Data.YafDBAccess.ExecuteNonQuery(SqlCommand cmd) +6

YAF.Providers.Roles.DB.AddUserToRole(Object appName, Object userName, Object roleName) +165

YAF.Providers.Roles.YafRoleProvider.AddUsersToRoles(String[] usernames, String[] roleNames) +192

YAF.Classes.Core.RoleMembershipHelper.AddUserToRole(String username, String role) +97

YAF.Classes.Core.RoleMembershipHelper.SetupUserRoles(Int32 pageBoardID, String userName) +253

YAF.Pages.register.CreateUserWizard1_CreatedUser(Object sender, EventArgs e) +82

System.EventHandler.Invoke(Object sender, EventArgs e) +0

System.Web.UI.WebControls.CreateUserWizard.OnCreatedUser(EventArgs e) +111

System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +354

System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +102

System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +418

System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +161

System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37

System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118

System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4205

Sponsor
victorantos
14 years ago
are you sure you are running the right code?

I don't belive the latest release has such an error. Try again, clean install


jax
  • jax
  • 78.8% (Friendly)
  • YAF Lover Topic Starter
14 years ago

are you sure you are running the right code?

I don't belive the latest release has such an error. Try again, clean install

victorantos wrote:

Yep.. just installed a clean install of 1.9.4 Binary's and it's happeneing again. .Net 3.5 + SQL Server 2008 Developer Edition.

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
YAF-86

Fixed in latest code. Thanks for reporting it.

jax
  • jax
  • 78.8% (Friendly)
  • YAF Lover Topic Starter
14 years ago

YAF-86

Fixed in latest code. Thanks for reporting it.

Jaben wrote:

No worries - Thank you!

Simple replace of DLL's should work?

lfosdal
  • lfosdal
  • 72.8% (Friendly)
  • YAF Lover
14 years ago
I am still getting this error for any config change (such as changing global theme, or adding a forum).

Edit: Note that the forum was upgraded from 1.9.3 to 1.9.4.

Edit 2: Made a clean install testforum (without upgrading an existing one) - no such problems.

Using contents from SourceForge:

https://yafdotnet.svn.sourceforge.net/svnroot/yafdotnet/trunk/ 

Here: Changing a theme from Administrator|Board Settings

Clicking save gives:


Server Error in '/' Application.

Cannot insert the value NULL into column 'RegistryID', table 'nyeuof_yaf.dbo.yaf_Registry'; column does not allow nulls. INSERT fails.
The statement has been terminated.

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: Cannot insert the value NULL into column 'RegistryID', table 'nyeuof_yaf.dbo.yaf_Registry'; column does not allow nulls. INSERT fails.
The statement has been terminated.

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): Cannot insert the value NULL into column 'RegistryID', table 'nyeuof_yaf.dbo.yaf_Registry'; column does not allow nulls. INSERT fails.
The statement has been terminated.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
   System.Data.SqlClient.SqlDataReader.get_MetaData() +83
   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) +954
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteScalar() +139
   YAF.Classes.Data.YafDBAccess.ExecuteScalar(SqlCommand cmd, Boolean transaction) +265
   YAF.Classes.Data.YafDBAccess.ExecuteScalar(SqlCommand cmd) +45
   YAF.Classes.Data.DB.board_save(Object boardID, Object languageFile, Object culture, Object name, Object allowThreaded) +288
   YAF.Pages.Admin.boardsettings.Save_Click(Object sender, EventArgs e) +721

- There are no stupid questions.
logan
  • logan
  • 100% (Exalted)
  • YAF Leader
14 years ago
Did you rerun install to update database?
test
lfosdal
  • lfosdal
  • 72.8% (Friendly)
  • YAF Lover
14 years ago

Did you rerun install to update database?

logan wrote:

Yes. A second visit site.adr/install/default.aspx did not give any error messages.

A different thought: I had to delete yaf_pmessageview, yaf_vaccessfull and yaf_vaccess on the first install due to a already exists message - I assumed they would be regenerated. Maybe that's the real problem?


- There are no stupid questions.
lfosdal
  • lfosdal
  • 72.8% (Friendly)
  • YAF Lover
14 years ago
So... what are my options now? How do I get my 230 users and 33000 posts migrated from 1.9.3 to 1.9.4? Any other tricks to make the upgrade happen smoothly?
- There are no stupid questions.
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
The RegistryID is an autoincrement column. Check it. I think that your problem originates in a customization.
lfosdal
  • lfosdal
  • 72.8% (Friendly)
  • YAF Lover
14 years ago

The RegistryID is an autoincrement column. Check it. I think that your problem originates in a customization.

bbobb wrote:

A database customization? All c# / aspx code is pure 1.9.4.

Not sure where I should start looking?


- There are no stupid questions.
lfosdal
  • lfosdal
  • 72.8% (Friendly)
  • YAF Lover
14 years ago
It wasn't a db customization per se... I was just missing all the stored procs, the views, etc... *blush*
- There are no stupid questions.
blindthief
14 years ago

Yep.. just installed a clean install of 1.9.4 Binary's and it's happeneing again. .Net 3.5 + SQL Server 2008 Developer Edition.

jax wrote:

I am getting the same issue and was wondering if 1.9.4 will still work with .NET 2.0 and SQL Server 2005

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago

Yep.. just installed a clean install of 1.9.4 Binary's and it's happeneing again. .Net 3.5 + SQL Server 2008 Developer Edition.

blindthief wrote:

I am getting the same issue and was wondering if 1.9.4 will still work with .NET 2.0 and SQL Server 2005

jax wrote:

v1.9.4 is .NET v3.5 SP1 only.

DPSI
  • DPSI
  • 55.4% (Neutral)
  • YAF Forumling
13 years ago
I am still getting the same error after doing a new install of 1.9.5

Has anyone got this working in the new version? Please advise.