Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-17T22:01:23Z
Hey all,

For those who read some of this in another threat, I decided to start a new thread for this since I have a bit of new information and this isn't really related to the OP's original question anymore. Using IIS on a 2008 server, with 1.9.6 RC1 of YAF. Creating a new user, both through the admin panel and by attempting to register, results in the following errors:

System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'Name', table 'GameForum.dbo.yaf_User'; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column 'UserID', table 'GameForum.dbo.yaf_UserGroup'; column does not allow nulls. INSERT fails.
The statement has been terminated.
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()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at YAF.Classes.Data.MsSqlDbAccess.ExecuteNonQuery(IDbCommand cmd, Boolean transaction)
at YAF.Types.Interfaces.IDbAccessExtensions.ExecuteNonQuery(IDbAccess dbAccess, IDbCommand cmd)
at YAF.Classes.Data.LegacyDb.user_save(Object userID, Object boardID, Object userName, Object displayName, Object email, Object timeZone, Object languageFile, Object culture, Object themeFile, Object useSingleSignOn, Object textEditor, Object useMobileTheme, Object approved, Object pmNotification, Object autoWatchTopics, Object dSTUser, Object hideUser, Object notificationType)
at YAF.Pages.Admin.reguser.ForumRegister_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Error System 3/17/2012 9:53:23 PM System.String Show | Delete

System.Data.SqlClient.SqlException (0x80131904): Cannot insert the value NULL into column 'UserID', table 'GameForum.dbo.yaf_UserGroup'; column does not allow nulls. INSERT fails.
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()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at YAF.Classes.Data.MsSqlDbAccess.ExecuteNonQuery(IDbCommand cmd, Boolean transaction)
at YAF.Types.Interfaces.IDbAccessExtensions.ExecuteNonQuery(IDbAccess dbAccess, IDbCommand cmd)
at YAF.Classes.Data.LegacyDb.user_setrole(Int32 boardID, Object providerUserKey, Object role)
at YAF.Core.RoleMembershipHelper.CreateForumUser(MembershipUser user, String displayName, Int32 pageBoardID)

Error System 3/17/2012 9:53:23 PM user_aspnet in YAF.Classes.Data.DB.cs Show | Delete

System.Data.SqlClient.SqlException (0x80131904): Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Cannot insert the value NULL into column 'TimeZone', table 'GameForum.dbo.yaf_User'; column does not allow nulls. INSERT fails.
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()
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.ExecuteScalar()
at YAF.Classes.Data.MsSqlDbAccess.ExecuteScalar(IDbCommand cmd, Boolean transaction)
at YAF.Types.Interfaces.IDbAccessExtensions.ExecuteScalar(IDbAccess dbAccess, IDbCommand cmd)
at YAF.Classes.Data.LegacyDb.user_aspnet(Int32 boardID, String userName, String displayName, String email, Object providerUserKey, Object isApproved)

As I listed before, user information is created in yaf_prov_Membership and yaf_prov_Profile, but nothing is created in yaf_User or yaf_CheckEmail. Which, as you can see from the errors above, makes sense. I have no idea what to do about this error though, I'm not sure why its attempting to input NULL's for the fields listed since they are, of course, supplied when making the new user. Any thoughts?
Sponsor
Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-18T19:57:29Z
A suggestion was made that it may be that the email/username is part of an existing account, but that is not the case here, I have double checked this by trying several unique names and the results are the same.
Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-20T22:39:56Z
I was wondering if there is a way to create users out of yaf, at least temporarily, until I can get this issue solved. Anyone know?
squirrel
2012-03-21T01:57:23Z
Originally Posted by: Thantis 

I was wondering if there is a way to create users out of yaf, at least temporarily, until I can get this issue solved. Anyone know?



Is there a chance any of your stored procedures on your SQL database have been altered or corrupted? I have a Win 2008 Server running SQL 2008 R2 and I cannot reproduce the error on my end on a clean install --


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-21T04:05:21Z
I can take a peek, but I'm not sure what should be there, I suppose I could look at a fresh database from yaf and compare.
squirrel
2012-03-21T07:29:24Z
Originally Posted by: Thantis 

I can take a peek, but I'm not sure what should be there, I suppose I could look at a fresh database from yaf and compare.



I don't know the code well enough to tell if that's a stored_proc gone bad or something else - but I can't reproduce it on a fairly identical setup (for the most part) -- so that's what I'd lean towards --

Are you using default providers (I think you answered before but I can't remember as I post this) --

If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-21T19:17:36Z
I'm using the default providers. I don't see anything in the procedures that looks corrupted, and just to be sure I updated them with the .sql file that comes with yaf, but no luck, still the same errors.
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-03-21T22:28:13Z
You just have trouble getting a user's ProviderUserKey for user_aspnet sp. The value originates from the MemebershipProvider table as UserID. I can't reproduce it.
squirrel
2012-03-22T00:05:06Z
@bbobb - Maybe ASP.NET provider problem with IIS installation? issue on populating the field that the SP you mention is looking for?
If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-03-22T00:55:25Z
Originally Posted by: squirrel 

@bbobb - Maybe ASP.NET provider problem with IIS installation? issue on populating the field that the SP you mention is looking for?


I don't know for sure without knowing what values are passed in each case. He needs to fetch db and reprocude it on a local machine.

Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-22T16:33:53Z
I can make the database available if either of you could help me test it, there is no sensitive information in the database.
Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-23T02:47:39Z
I've reinstalled asp.net and this hasn't resolved the problem, but I also figured out how to add the users by hand via queries, thankfully the user-base is small and doesn't often expand. I am at a loss as to what else to try, so if anyone has any other ideas for how I can track this down, please let me know. I considered trying to update to the latest changeset in hopes that it might resolve the error, but for some reason vs 2010 hard-locks the computer then I attempt to build the project. C'est la vie.
squirrel
2012-03-23T03:17:56Z
Originally Posted by: Thantis 

I've reinstalled asp.net and this hasn't resolved the problem, but I also figured out how to add the users by hand via queries, thankfully the user-base is small and doesn't often expand. I am at a loss as to what else to try, so if anyone has any other ideas for how I can track this down, please let me know. I considered trying to update to the latest changeset in hopes that it might resolve the error, but for some reason vs 2010 hard-locks the computer then I attempt to build the project. C'est la vie.



I'd like to get into the middle of this with you and help you out -- I've just been extremely stacked up on projects as of late and haven't been able to get caught up.


If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2012-03-24T14:40:47Z
What ASP.NET membership provider are you using?
Thantis
  •  Thantis
  • 81.8% (Honored)
  • YAF Commander Topic Starter
2012-03-24T21:01:16Z
I use the default

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