Got another problem now:
I create a new user and when I try to upload an avatar with that user logged in I get an exception:
An exception was caught during the execution of an action query: The
INSERT statement conflicted with the FOREIGN KEY constraint
"FK_UserAvatar_aspnet_Users". The conflict occurred in database
"***dbname***", table "dbo.aspnet_Users", column 'UserId'.
The statement has been terminated.. Check InnerException, QueryExecuted
and Parameters of this exception to examine the cause of this exception.
at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteActionQuery(IActionQuery
queryToExecute) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PersistQueue(List`1
queueToPersist, Boolean insertActions) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave, Boolean refetchAfterSave, IPredicateExpression updateRestriction, Boolean recurse)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2
entityToSave) at MonoSoftware.LLBLGen.Repository.SaveEntity(IEntity2 entityToSave)
at MonoSoftware.MonoX.ModuleGallery.UserAvatar.SaveAvatar(AvatarPostedFile
postedFile) at MonoSoftware.MonoX.ModuleGallery.UserAvatar.#AP(FileInformation
fileInformation)at MonoSoftware.MonoX.Controls.CropImage.OnImageResized(Byte[]
croppedContent, Byte[] originalImageContent) at MonoSoftware.MonoX.Controls.CropImage.#wP(Object sender, EventArgs e) at MonoSoftware.MonoX.Controls.StyledButton.OnClick(Object sender,
EventArgs e) at MonoSoftware.MonoX.Controls.StyledButton.#Ho(Object sender,
EventArgs e) at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) at System.Web.UI.WebControls.LinkButton.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)
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_UserAvatar_aspnet_Users". The conflict occurred in database "***dbname***", table "dbo.aspnet_Users", column 'UserId'. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.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) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1
completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute()
This content has not been rated yet.
95
Reputation
13
Total posts