Hi
I am calling a external rest service which returns a 404 error if query is not found. I would like to handle this error (and other errors) and not the default defaultError404 AbpHttpConfiguration.
this.ServiceProxy.apiV1Post(input)
.finally(() => { this.saving = false; })
.subscribe(() => {
this.notify.info(this.l('SavedSuccessfully'));
this.close();
this.modalSave.emit(null);
});
How to display custom error and prevent defaultError404 being called?
We call the exteranl service via serviceproxy generated by nswag.
It is a angular 5 +.net core project
I seen the "abpHandleError" setting but that seems to relate to a jquery project. Correct me if i am wrong.
Thanks, Henrik
Add and configure DbContext in SchemaStagingServiceEntityFrameworkCoreModule public override void PreInitialize() { Configuration.ReplaceService<IEfCoreTransactionStrategy, DbContextEfCoreTransactionStrategy>(DependencyLifeStyle.Transient); if (!SkipDbContextRegistration) { Configuration.Modules.AbpEfCore().AddDbContext<SchemaStagingServiceDbContext>(configuration => { SchemaStagingServiceDbContextConfigurer.Configure(configuration.DbContextOptions, configuration.ConnectionString); }); } }
Add and configure DbContext in StagingInfrastructureModule public override void PreInitialize() { Configuration.ReplaceService<IEfCoreTransactionStrategy, DbContextEfCoreTransactionStrategy>(DependencyLifeStyle.Transient); if (!SkipDbContextRegistration) { Configuration.Modules.AbpEfCore().AddDbContext<StagingDbContext>(configuration => { StagingDbContextConfigurer.Configure(configuration.DbContextOptions, "Server=localhost; Database=Staging; Trusted_Connection=True; MultipleActiveResultSets=True;"); }); } }
Hi
We have to access and update tables in two databases within same transaction scope. We have the same setup as described here, <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/2325">https://github.com/aspnetboilerplate/as ... ssues/2325</a>. Also we have changed database transaction strategy to DbContextEfTransactionStrategy as described in <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration#transaction-management">https://aspnetboilerplate.com/Pages/Doc ... management</a>.
The metod public DbContext CreateDbContext<TDbContext>(string connectionString, IDbContextResolver dbContextResolver) is always called the default connectionstring and therefore the second dbcontext is never inserted into this.ActiveTransactions[connectionString].
Abp Version is 2.2.2
Regards,
@rvanwoezik Thanks for your snippit for the url rewrite.
I found that there was a problem with the routing because the server that is hosting the application is in another domain that is not trusted. This caused some redirects to fail.
Thanks for the quick reply.
Hi,
I am trying to add a https (port 443) binding in IIS for the Angular site but I get an error saying "An Error Has Occurred"
I have checked the following:
If I switch the Angular site back to http (port 80) I don't get the error.
I have tried to search the forums for similar problems but with no luck.
Can you provide a quick guide to enabling HTTPS for the Angular site?
Best regards Henrik