Base solution for your next web application
Open Closed

Error when new registered users click email #2372


User avatar
0
rvanwoezik created

I'm using ASP.NET MVC 5.x & Angularjs 1.x

Existing Users don't have problems, only for new users Checked DB Table AbpUsers, new user with mentioned id is in DB

I've extended User with properties like DateOfBirth, Address etc. Also changed to https / ssl

Workflow is that Admin adds User -> New User receives Email confirmation mail. When they click the link they get following error:

[https://www.phoogle.nl/Account/EmailConfirmation?userId=wRf37Cr1IEOkUyMX12s7Gg%3D%3D&tenantId=mFlm%2BKHDrbFA%2BQWcyocM9g%3D%3D&confirmationCode=fd8baadba672497695e88d687396a269])

There is no such an entity. Entity type: PhoogleZero.Authorization.Users.User, id: 199

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: Abp.Domain.Entities.EntityNotFoundException: There is no such an entity. Entity type: PhoogleZero.Authorization.Users.User, id: 199

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: 


[EntityNotFoundException: There is no such an entity. Entity type: PhoogleZero.Authorization.Users.User, id: 199]
   Abp.Domain.Repositories.<GetAsync>d__17.MoveNext() +325
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   Abp.Threading.<AwaitTaskWithPostActionAndFinallyAndGetResult>d__5`1.MoveNext() +550
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   Abp.Authorization.Users.&lt;GetUserNameFromDatabaseAsync&gt;d__64.MoveNext() +446
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   Abp.Authorization.Users.&lt;UpdateAsync&gt;d__41.MoveNext() +517
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PhoogleZero.Web.Controllers.&lt;EmailConfirmation&gt;d__39.MoveNext() +772
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   Abp.Threading.&lt;AwaitTaskWithPostActionAndFinallyAndGetResult&gt;d__5`1.MoveNext() +550
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +92
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult) +97
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult asyncResult) +17
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32
   System.Web.Mvc.Async.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() +50
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() +225
   System.Web.Mvc.Async.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34
   System.Web.Mvc.Async.<>c__DisplayClass2b.<BeginInvokeAction>b__1c() +26
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +36
   Castle.Proxies.AccountControllerProxy.EndExecuteCore_callback(IAsyncResult asyncResult) +4
   Castle.Proxies.Invocations.Controller_EndExecuteCore.InvokeMethodOnTarget() +55
   Castle.DynamicProxy.AbstractInvocation.Proceed() +80
   Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) +42
   Castle.DynamicProxy.AbstractInvocation.Proceed() +108
   Castle.Proxies.AccountControllerProxy.EndExecuteCore(IAsyncResult asyncResult) +142
   System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +12
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   Castle.Proxies.AccountControllerProxy.EndExecute_callback(IAsyncResult asyncResult) +26
   Castle.Proxies.Invocations.Controller_EndExecute.InvokeMethodOnTarget() +55
   Castle.DynamicProxy.AbstractInvocation.Proceed() +80
   Abp.Domain.Uow.UnitOfWorkInterceptor.Intercept(IInvocation invocation) +42
   Castle.DynamicProxy.AbstractInvocation.Proceed() +108
   Castle.Proxies.AccountControllerProxy.EndExecute(IAsyncResult asyncResult) +142
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +21
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +129

Any Tips what can cause this?


30 Answer(s)
  • User Avatar
    0
    exlnt created

    I completed the upgrade to ABP 1.4.1 and applied the code change to the session constructor method. But I am still getting an error when the user clicks on email link. [https://drive.google.com/file/d/0B5HAoiVVXzY7RUViQ1FDdHAzN0k/view?usp=sharing])

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @exlnt,

    Normally, upgrading to v1.4 should fix the problem. I have requested your project for some other problem, I can take a look at this one as well.

    Thanks.

  • User Avatar
    0
    exlnt created

    I tried the email activation again and it worked this time. Thanks! :)

  • User Avatar
    0
    vdallaglio created

    Hi, can you please send me the Dutch localisation file? Thank you in advance :D

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Are you asking about AspNet Zero ? We don't have dutch localization but if you know dutch, you can localize this document <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Core/Localization/AbpZeroTemplate/AbpZeroTemplate.xml">https://github.com/aspnetzero/aspnet-ze ... mplate.xml</a>.

    Thanks.