jax
  •  jax
  • 78.8% (Friendly)
  • YAF Lover Topic Starter
2010-07-12T11:47:20Z
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
2010-07-12T18:10:13Z
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
2010-07-13T12:31:55Z
victorantos wrote:

are you sure you are running the right code?

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



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
2010-07-13T17:51:42Z
YAF-86

Fixed in latest code. Thanks for reporting it.
jax
  •  jax
  • 78.8% (Friendly)
  • YAF Lover Topic Starter
2010-07-13T18:08:33Z
Jaben wrote:

YAF-86

Fixed in latest code. Thanks for reporting it.



No worries - Thank you!

Simple replace of DLL's should work?
lfosdal
2010-08-09T12:12:35Z
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.so...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
2010-08-09T13:36:15Z
Did you rerun install to update database?
test
lfosdal
2010-08-09T13:41:33Z
logan wrote:

Did you rerun install to update database?


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
2010-08-10T06:44:46Z
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
2010-08-10T21:53:22Z
The RegistryID is an autoincrement column. Check it. I think that your problem originates in a customization.
lfosdal
2010-08-10T22:20:12Z
bbobb wrote:

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



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
2010-08-28T17:22:23Z
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
2010-09-16T17:33:22Z
jax 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.



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
2010-09-16T21:26:20Z
blindthief wrote:

jax 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.



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


v1.9.4 is .NET v3.5 SP1 only.
DPSI
  •  DPSI
  • 55.4% (Neutral)
  • YAF Forumling
2010-11-23T17:20:17Z
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.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved