Base solution for your next web application

Activities of "sneddo"

I worked out what this was for my environment.

Im running my app on a kubernetes setup using nginx ingress controller. This controller terminates ssl. This would normally be fine, but in front of that I have a load balancer which is set up as a proxy to the ingress controller. The issue is that my hosts load balancer doesnt pass through x-forward headers when in proxy pass though configuration. This is a bit poor.

So my solution to this has been to force the app to https with a little middleware that sets the request scheme.

The app now works on latest chrome.

Hi @tinytownsoftware

Did you work out why chrome was / is doing this?

Im having a similar issue.

Works on Edge, and version of Chrome below v84.

But it will not no matter what I do in terms of cleaning cookies or anything else. It will not log into the latest version of chrome: Version 84.0.4147.89 (Official Build) (64-bit) On Windows 10.

I found the issue in the end.

I am setting the env before starting the app, the issue I had was the migrator app never picked up the connection string from my appsettings.{environment}.json file.

I had to make a small modification to the {Application}MigratorModule.

In the constructor I added: string environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");

and amended the call to AppConfigurations.Get to include the environment as per above as the second parameter.

Once this was done the migrator app would use the appsettings files I was expecting / wanting it to use.

I am building the project in release mode. when I run it I want to be able to specify which environment to run against. What is the best way to achieve this?

Im not sure where the project pick up the current environment, perhaps within the AbpBootstrapper.Create method?

Guidance welcome. Ideally I will just pass an argument to the programe, environment or something like that.

Hi, I have upgraded to 8.8 and everything appears to have gone well apart from the above test now failing.

This is the message:

Message: Abp.AbpException : There is no setting defined with name: ExternalLoginProvider.Facebook Stack Trace: SettingDefinitionManager.GetSettingDefinition(String name) SettingManager.GetSettingValueInternalAsync(String name, Nullable1 tenantId, Nullable1 userId, Boolean fallbackToDefault) UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) HostSettingsAppService.GetExternalLoginProviderSettings() line 212 HostSettingsAppService.GetAllSettings() line 48 AuthorizationInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) AuditingInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) AuditingInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) ValidationInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) HostSettingsAppService_EmailSettings_Test.Should_Change_Email_Settings() line 44 --- End of stack trace from previous location where exception was thrown ---

This makes me think I might have missed something during the upgrade but I cant for the life of me find what that might be. It appears the setting provider _hostSettingsAppService.GetAllSettings() isnt being prepared with the correct data before the test is run.

Yes it is.

Hello,

I want my app to auo migrate any db changes on start up. This is normally pretty simple in that you just call Migrate() on the DB context.

Something like:

using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) { var context = serviceScope.ServiceProvider.GetService<T>(); context.Database.Migrate(); }

Where T is DbContext. In this case MyAppDbContext. But the service provider is unable to resolve the db context so I assume there is another way to do that?

@maliming / @fvdh - I have run into the same issue, can you share here what the underlying issue was or indicate where it was so others (like me) who run into the same issue can fix it and move on?

Thanks.

Showing 1 to 8 of 8 entries