emonney / QuickApp

ASP.NET Core / Angular startup project template with complete login, user and role management. Plus other useful services for Quick Application Development
https://www.ebenmonney.com/quickapp
MIT License
1.26k stars 594 forks source link

HTTPErrorResponse Creating User #93

Closed joeg10 closed 5 years ago

joeg10 commented 6 years ago

I'm receiving the errors below when calling AccountController.Register. When stepping through the code is see that the method hits the correct return and userVM is correct. I'm using your Pro template, can you help me out please? Thanks

This is being hit - CreatedAtAction(GetUserByIdActionName, new { id = userVM.Id }, userVM);

These are the errors:

Failed to load resource: net::ERR_CONNECTION_RESET alert.service.ts:176 Severity: "error", Summary: "Save Error", Detail: "One or more errors occured whilst saving your changes:", Error: "{"headers":{"normalizedNames":{},"lazyUpdate":null,"headers":{}},"status":0,"statusText":"Unknown Error","url":null,"ok":false,"name":"HttpErrorResponse","message":"Http failure response for (unknown url): 0 Unknown Error","error":{"isTrusted":true}}"

AnassL commented 6 years ago

@emonney, I have got this error from the login screen, after I changed the environment.ts url address from null to the address of my backend API 'http://localhost:5000' When I try to log in, the app shows the modal message: "Dear Developer! It appears your backend Web API service is not running... so, what if one would like to use localhost for the backend, how to get rid of that message ?

joeg10 commented 6 years ago

This turned out to be a json serialization issue for me. Simplifying the returned fixed the issue.