SedonaWeb 2.0 ExecuteSPAddWSAccountAsync Error During Account Registration

After a deployment or upgrade if a customer receives the error during registration. The customer facing error will be generic

You will need to login to the HostAdmin or Admin account to review the Logs and you will see more details around the error if you track to the time it was received.

Message
Error Adding Account: Calling ExecuteSPAddWSAccountAsync

MessageTemplate
Error Adding Account: Calling ExecuteSPAddWSAccountAsync

Exception

System.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 2, current count = 0.
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, String endMethod, Boolean isInternal)
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
   at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

Development Script to fix [ran against company db]

-- Backup the table before making any change.

Select * into WS_Account_Backup12345 from WS_Account

Check the current setting for the table.

SELECT TABLE_NAME, COLUMN_NAME,DATA_TYPE , CHARACTER_MAXIMUM_LENGTH

FROM INFORMATION_SCHEMA.COLUMNS

WHERE

TABLE_SCHEMA = 'dbo' AND

TABLE_NAME = 'WS_Account' AND

COLUMN_NAME = 'Account_Name'

Alter the table to change the Account_Name size.

-- Run the script below to update the column to the correct type and size.

-- Update table to fix field size if it is not correct ---

alter table ws_account

ALTER COLUMN Account_Name [varchar](256) NOT NULL

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted for approval.