Base solution for your next web application
Open Closed

Register tentant not working #2740


User avatar
0
DennisAhlin created

Hi! For some reason, register tenant doesn't work in my .NET Core solution. Not from Swagger nor angular ui. It does not reach my breakpoint on first line of TenantRegistrationAppService/RegisterTenant method but returns 500 response code. Other endpoints, like Account/Register works as expected.

Here is my swagger post: <a class="postlink" href="https://www.dropbox.com/s/brh6bqpuppo6mde/Sk%C3%A4rmklipp%202017-03-21%2012.30.51.png">https://www.dropbox.com/s/brh6bqpuppo6m ... .30.51.png</a>


7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Do you have any exception message in Logs.txt ? I have tried to register and failed as you said :).

    Thanks.

  • User Avatar
    0
    DennisAhlin created

    DEBUG 2017-03-21 14:39:51,155 [15 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL3GCTFH9U83" completed keep alive response. INFO 2017-03-21 14:39:51,155 [15 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 12.0115ms 500 INFO 2017-03-21 14:39:55,430 [14 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 OPTIONS <a class="postlink" href="http://api.staging.project.com/api/services/app/TenantRegistration/RegisterTenant">http://api.staging.project.com/api/serv ... sterTenant</a>
    DEBUG 2017-03-21 14:39:55,430 [14 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HL3GCTFH9U8A" completed keep alive response. INFO 2017-03-21 14:39:55,430 [14 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 2.478ms 204 INFO 2017-03-21 14:39:55,508 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST <a class="postlink" href="http://api.staging.project.com/api/services/app/TenantRegistration/RegisterTenant">http://api.staging.project.com/api/serv ... sterTenant</a> application/json; charset=UTF-8 461 DEBUG 2017-03-21 14:39:55,508 [9 ] NetCore.StaticFiles.StaticFileMiddleware - POST requests are not supported DEBUG 2017-03-21 14:39:55,508 [9 ] osoft.AspNetCore.Routing.Tree.TreeRouter - Request successfully matched the route with name '(null)' and template 'api/services/app/TenantRegistration/RegisterTenant'. DEBUG 2017-03-21 14:39:55,523 [9 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action project.MultiTenancy.TenantRegistrationAppService.RegisterTenant (project.Application) DEBUG 2017-03-21 14:39:55,555 [9 ] Mvc.ModelBinding.Binders.BodyModelBinder - Selected input formatter 'Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter' for content type 'application/json; charset=UTF-8'. INFO 2017-03-21 14:39:55,555 [9 ] ore.Mvc.Internal.ControllerActionInvoker - Executing action method project.MultiTenancy.TenantRegistrationAppService.RegisterTenant (project.Application) with arguments (project.MultiTenancy.Dto.RegisterTenantInput) - ModelState is Valid ERROR 2017-03-21 14:39:55,695 [4 ] Mvc.ExceptionHandling.AbpExceptionFilter - Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) System.IO.FileLoadException: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'System.Diagnostics.DiagnosticSource, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' at System.Net.Http.WinHttpHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClientHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at PaulMiami.AspNetCore.Mvc.Recaptcha.RecaptchaService.<ValidateResponseAsync>d__16.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at project.Web.Security.Recaptcha.RecaptchaValidator.<ValidateAsync>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at project.MultiTenancy.TenantRegistrationAppService.<RegisterTenant>d__9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Mvc.Internal.ObjectMethodExecutor.<CastToObject>d__40`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.

    Could it be after ABP update?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Yes, it is possible. Let us check this and get back to you. We will try to fix this as soon as possible.

    Thanks.

  • User Avatar
    0
    DennisAhlin created

    @ismcagdas, have you made any progress on this issue? I've tried solving it myself but with no luck. Is there a git issue I can follow to get updates?

  • User Avatar
    0
    DennisAhlin created

    I solved it by adding Nuget dependency to System.Net.Http 4.3.1 explicitly in .Application, .Core and .Web.Core projects.

  • User Avatar
    0
    antonis created

    Have the same problem. Just downloaded a test project (asp.net core and jquery) I run migrator then I run the site once I click New Tenant or Login I get this error

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Have you updated to System.Net.Http 4.3.1 ?

    Thanks.