IMPORTANT!
This forum is now archived. Click here for the New Support Forum
Failed to load users
Quote from walid336 on February 5, 2018, 5:49 pmCurrently using the angular material folder with npm start, the clientApp is removed. the users table has been modified to add a filed (string) in both the backend and user.model
I was able to successfully login, but when the users tab is clicked I get an error in the console
"", Error: "{"headers":{"normalizedNames":{},"lazyUpdate":null},"status":200,"statusText":"OK","url":"http://localhost:5050/account/login?returnUrl=%2Fapi%2Faccount%2Fusers","ok":false,"name":"HttpErrorResponse","message":"Http failure during parsing for http://localhost:5050/account/login?returnUrl=%2Fapi%2Faccount%2Fusers","error":{"error":{},"text":"<!DOCTYPE html>
the server had the following response (302 found for users and 304 for roles)
IdentityServer4.Hosting.CorsPolicyProvider[0]
CORS request made for path: /api/account/users from origin: http://localhost:4200 but was ignored because path was not for an allowed IdentityServer CORS endpoint
could you help please...
Currently using the angular material folder with npm start, the clientApp is removed. the users table has been modified to add a filed (string) in both the backend and user.model
I was able to successfully login, but when the users tab is clicked I get an error in the console
"", Error: "{"headers":{"normalizedNames":{},"lazyUpdate":null},"status":200,"statusText":"OK","url":"http://localhost:5050/account/login?returnUrl=%2Fapi%2Faccount%2Fusers","ok":false,"name":"HttpErrorResponse","message":"Http failure during parsing for http://localhost:5050/account/login?returnUrl=%2Fapi%2Faccount%2Fusers","error":{"error":{},"text":"<!DOCTYPE html>
the server had the following response (302 found for users and 304 for roles)
IdentityServer4.Hosting.CorsPolicyProvider[0]
CORS request made for path: /api/account/users from origin: http://localhost:4200 but was ignored because path was not for an allowed IdentityServer CORS endpoint
could you help please...
Quote from Eben Monney on February 10, 2018, 1:51 amDid you also split the IdentityServer portion from the Backent API as part of your modifications? This looks like an incorrect IdentityServer configuration.
Please follow the discussion here "https://www.staging8.ebenmonney.com/forum/?view=thread&id=27" on how to properly configure the backend to work with the Angular CLI version.
Did you also split the IdentityServer portion from the Backent API as part of your modifications? This looks like an incorrect IdentityServer configuration.
Please follow the discussion here "https://www.staging8.ebenmonney.com/forum/?view=thread&id=27" on how to properly configure the backend to work with the Angular CLI version.
Quote from walid336 on February 10, 2018, 6:03 pmThe identity server configuration is untouched, although i modified the profile service to include the add user field
public async Task GetProfileDataAsync(ProfileDataRequestContext context){var sub = context.Subject.GetSubjectId();var user = await _userManager.FindByIdAsync(sub);var principal = await _claimsFactory.CreateAsync(user);var claims = principal.Claims.ToList();claims = claims.Where(claim => context.RequestedClaimTypes.Contains(claim.Type)).ToList();if (user.JobTitle != null)claims.Add(new Claim(PropertyConstants.JobTitle, user.JobTitle));if (user.HospitalId != null)claims.Add(new Claim(PropertyConstants.HospitalId, user.HospitalId));
The identity server configuration is untouched, although i modified the profile service to include the add user field
Quote from Eben Monney on February 10, 2018, 10:42 pmEnsure the cors configurations from Startup.cs exists. These are the only cors configuration needed to run this project.
i.e.public void ConfigureServices(IServiceCollection services) { ------ // Add cors services.AddCors(); ------ }and
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { ------ //Configure Cors app.UseCors(builder => builder .AllowAnyOrigin() .AllowAnyHeader() .AllowAnyMethod()); ------ }If these configurations are intact you can send me a stripped down version of your project for further analysis.
Ensure the cors configurations from Startup.cs exists. These are the only cors configuration needed to run this project.
i.e.
public void ConfigureServices(IServiceCollection services) { ------ // Add cors services.AddCors(); ------ }
and
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { ------ //Configure Cors app.UseCors(builder => builder .AllowAnyOrigin() .AllowAnyHeader() .AllowAnyMethod()); ------ }
If these configurations are intact you can send me a stripped down version of your project for further analysis.
Quote from walid336 on February 11, 2018, 7:02 amStartup has the same configuration
https://github.com/QadMohKuwait/QIIS2-pro/invitations
this the repo on my github
Startup has the same configuration
https://github.com/QadMohKuwait/QIIS2-pro/invitations
this the repo on my github
Quote from Eben Monney on February 11, 2018, 9:05 pmThere're cyclic cascade paths in your foreign key constraints. Hence migrations and DB seeding does not work.
Please correct this and make sure db seeding actually happens. (i.e. after first run the demo data/user actually exists in the db).
One important thing to also note is to make sure the line 113 below from Startup.cs actually points to the address of the backend/identityserver api.
options.Authority = "http://localhost:5050/";
There're cyclic cascade paths in your foreign key constraints. Hence migrations and DB seeding does not work.
Please correct this and make sure db seeding actually happens. (i.e. after first run the demo data/user actually exists in the db).
One important thing to also note is to make sure the line 113 below from Startup.cs actually points to the address of the backend/identityserver api.
options.Authority = "http://localhost:5050/";
Quote from walid336 on February 12, 2018, 5:29 amThe cyclic cascade was managed by changing onDelete.cascade to NoAction,
I have modified the connection to connect to azure DB
Could you have a look, you dont need to build the database
The cyclic cascade was managed by changing onDelete.cascade to NoAction,
I have modified the connection to connect to azure DB
Could you have a look, you dont need to build the database
IMPORTANT!
This forum is now archived. Click here for the New Support Forum