When sending X-Requested-With :XMLHttpRequest
in the header, the correct status is responded when unauthorized: 401 instead of 200.
But the content is still the HTML page:
...
<div class="col">
<div class="status-content">
<h1>401</h1>
<h2 class="text-danger mb-0">
Unauthorized<small class="text-muted">An internal error occurred during your request!</small>
</h2>
<p class="mt-3 mb-4"></p>
<a href="/" class="btn btn-primary">Go to the homepage</a>
<a href="javascript:history.back()"
class="mt-4 mb-1 d-block"><i class="fa fa-long-arrow-left"></i> Go back</a>
</div>
</div>
...
How can I get a the default error JSON response content?
{
"error": {
"message": "Some error message"
}
}
I tried to send additional headers: Content-Type: application/json Accept: application/json
But the content is always HTML.
Thank you for your help!
How is it possible to have multiple languages link to 1 localization file? e.g. "de", "de-de", "de-at" should all show the translations of 1 translation file.
This is required when the client sends the language (e.g. as cookie or query param). Currently with only 1 language "de-de", when the client sends "de-at", it will show the default language english.
As a workaround we duplicate the jsons, which is a overhead on every text change.
Thank you in advance!
We want to update localization Files (e.g. en.json) during runtime (e.g. when application is restarted).
Documentation (https://docs.abp.io/en/abp/latest/Localization) says
"JSON files are embedded into the assembly using AbpVirtualFileSystemOptions (see virtual file system)."
Configure<AbpLocalizationOptions>(options =>
{
//Define a new localization resource (MyProjectName)
options.Resources
.Add<MyProjectName>("en")
.AddVirtualJson("/Localization/MyProjectName");
});
And on https://docs.abp.io/en/abp/latest/Virtual-File-System:
"Physical files always override the virtual files. That means if you put a file under the /wwwroot/my-folder/my-file.css, it will override the file in the same location of the virtual file system. So, you need to know the file paths defined in the modules to override them."
Now when I put a file there, e.g. /wwwroot/Localization/MyProjectName/en.json, it does not overwrite the localization text. I also tried /Localization/MyProjectName/en.json, which also does not work.
So my question is, how is it possible to update whole localization JSON files during runtime?
Updating single texts via UI Administration->Language Management does not solve the issue, as we have hundreds of texts
Thank you in advance!
Audit log UI can only handle little data. When using blazor, UI crashes when too much data exists & call runs into timeout.
Please provide an option to disable pagination. Allowing to search for everything looks nice, but does not work. We need audit logs that do not crash when many logs exist in a short amout of time.
Expected behaviour: PW should be displayed empty when it cannot be decrypted, so that it is still possible to change it via UI.
ABP Framework version: v5.1.2
UI type: Blazor Server
DB provider: EF Core
Tiered (MVC) or Identity Server Separated (Angular): no
Steps to reproduce the issue:
This is a bad problem! We have "stand alone" webview pages that are part of a mobile application & require a login & then show 1 view. Now the user gets redirected to a different page, breaking the whole application workflow!
This is probably related to
I hope this can get highly prioritized.
We added ~10 settings pages. Now clicking on "Settings" in "Administration" is taking 10 seconds. It seems like ABP is loading and rendering all settings for all subpages in one go. This should not be done, its not extenable.
How can be tell ABP to lazy load the settings tabs, only when clicked?
One thing we tried was loading the the data itself in OnAfterRenderAsync for each component, but this does not help, as it still does this for all settings at the same time.
All other pages redirect to login. http://localhost:5000/setting-management crashes. This should be fixed.
We migrated our application from 4.3.3 to 5.0.1. This was quite difficult, as the startup template comparison alone shows so many differences.
5.0.1: Everything worked, except refreshing a sub-path (e.g. root/subpage). This would lead to duplicate path found error.
5.1.1: After updating to 5.1.1 for this fix (blazor/hotreload), clicking on "login" threw an error. But 1.5.2 was already out, so we migrated to 5.1.2
5.1.2: Here the application would start without issues. Clicking "login" properly navigates to the login site. But after a successful login, the user is still not logged in (login window closes successfully. This is different to a "wrong" login, where the error message correctly gets shown)! In backend it works, this can be checked with Swagger, where we can login & query authorized endpoints.
Our problem: There are no error shown. Before migration, everything worked. With 5.1.2, the login does not work in Blazor Server UI. There is also nothing mentioned in the migration guide regarding this. I dont see a way to find the error with 0 logged exceptions, and no change on our side to the login workflow between abp 5.0.1 and 5.1.2.
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware: 10:04:36,029 ERROR Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request.
Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints. Matches:
/_Host
/_Host
at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ReportAmbiguity(CandidateState[] candidateState)
at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.ProcessFinalCandidates(HttpContext httpContext, CandidateState[] candidateState)
at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.Select(HttpContext httpContext, CandidateState[] candidateState)
at Microsoft.AspNetCore.Routing.Matching.DefaultEndpointSelector.SelectAsync(HttpContext httpContext, CandidateSet candidateSet)
at Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet)
at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask)
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
We have a blazor server application. After upgrading from 4.3.X to 5.0.1 we now get a AmbiguousMatchException when calling any path directly that is not the root (e.g. http://localhost:5000/audit-logs). Refreshing the root http://localhost:5000, works fine.
In the migration guide and also when comparing the startup templates, I did not see any changes to modules that we also have to do and that can cause this issues.