If you're creating a bug/problem report, please include followings:
Hi,
I'm building another Web Application in Blazor WebAssembly PWA that will just trigger some actions from my main web page application. It is not using ABP.IO framework, it is just a simple application.
To call methods from Web API, I know that I can request the Token using /access/token and using the Identity Server client details. Then, when calling the method using HttpClient, I have to add the "__tenant" and "Authorization" with "Bearer {access_token}" in the Header.
Questions:
Kind regards,
Leonardo Willrich.
I have an external application that accesses the Web API. To do that, it requests the Token using the method access/token and passing the client_id, client_secret, and grant_type parameters. It was working, but, it is no longer working. Calling access/token by Postman only returns "Invalid_Client", it seems that the client doesn't exist, which is not true. Checking the logs, the it says that the secret doesn't match, but, I am 100% sure that it is the same secret. The previous secret was expired, so, I've changed the date/time for it. I've restarted the application and cleaned the Redis cache to be sure it wouldn't be some cache issue.
Here is my request in Postman. In the Headers, I have the property "__tenants" with the tenant name:
Here is the Log file for the request in the Web Api: [15:17:19 INF] Request starting HTTP/1.1 POST https://localhost:44364/connect/token application/x-www-form-urlencoded 79 [15:17:19 DBG] Request path /connect/token matched to endpoint type Token [15:17:19 DBG] Endpoint enabled: Token, successfully created handler: IdentityServer4.Endpoints.TokenEndpoint [15:17:19 INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.TokenEndpoint for /connect/token [15:17:19 DBG] Start token request. [15:17:19 DBG] Start client validation [15:17:19 DBG] Start parsing Basic Authentication secret [15:17:19 DBG] Start parsing for secret in post body [15:17:19 DBG] Parser found secret: PostBodySecretParser [15:17:19 DBG] Secret id found: SBC_Reports_2 [15:17:19 DBG] client configuration validation for client SBC_Reports_2 succeeded. [15:17:19 DBG] No matching hashed secret found. [15:17:19 DBG] Secret validators could not validate secret [15:17:19 INF] {"ClientId": "SBC_Reports_2", "Category": "Authentication", "Name": "Client Authentication Failure", "EventType": "Failure", "Id": 1011, "Message": "Invalid client secret", "ActivityId": "400001eb-0004-b900-b63f-84710c7967bb", "TimeStamp": "2022-07-11T03:17:19.0000000Z", "ProcessId": 29156, "LocalIpAddress": "::1:44364", "RemoteIpAddress": "::1", "$type": "ClientAuthenticationFailureEvent"} [15:17:19 ERR] Client secret validation failed for client: SBC_Reports_2. [15:17:19 INF] Request finished HTTP/1.1 POST https://localhost:44364/connect/token application/x-www-form-urlencoded 79 - 400 - application/json;+charset=UTF-8 28.5513ms
Here is the client with the Secret:
Sometimes, when adding another secret or doing some changes in the Identity Client, using the framework UI, it throws an exception:
Hi,
I want to create the tenant in the database and that the user name, surname, and username have a valid name instead of "admin" as it is hardcoded. What is the best way to implement that? I have a "Register" form where I can add the fields, but, also I'll be creating Tenants from the default CRUD.
I've updated the ABP.IO framework Blazor - WASM from 5.2.1 to 5.2.2 and I've noticed that the file flag-icons.min.css was deleted and a new file was created called flag-icon.min.css (without the letter "s").
How to fix that?
Also, if I run "abp install-libs" it deletes a lot of folders inside the libs folder. Is that normal? Even the folder abp gets deleted.
If you're creating a bug/problem report, please include followings:
Hi,
I need to create a menu with a display name dynamic. It will show how many records I have (count) and will be updated dynamically.
I've tried two different ways, but no success. Below details:
Try 1: I've create a state container object and have added an onChange callback event. In the MenuContributor class, I've created a local variable to save my menu (ApplicationMenuItem) and then on OnChange Event I has updating the DisplayName property. The problem here is that the menu doesn't render (statehaschanged doesn't exist).
Code: `public class SBCMenuContributor : IMenuContributor { private readonly IConfiguration _configuration; private readonly MainFilterStateContainer _filter; private ApplicationMenuItem unknownDevicesMenu;
public SBCMenuContributor(IConfiguration configuration, MainFilterStateContainer filter)
{
_configuration = configuration;
_filter = filter;
filter.OnChange += UpdateMenu;
}
// Doesn't work, it doesn't refresh the menu
private void UpdateMenu()
{
Console.WriteLine("UpdateMenu Init");
if (unknownDevicesMenu != null)
{
Console.WriteLine("UpdateMenu - count: {0}", _filter.SelectedUnits.Count());
unknownDevicesMenu.DisplayName = "Unknow devices " + (_filter.SelectedUnits == null ? "Is null" : _filter.SelectedUnits.Count().ToString());
}
Console.WriteLine("UpdateMenu Done");
}
... (continue code)`
Here is how I create th menu:
unknownDevicesMenu = new ApplicationMenuItem(
"UnknownUnlinkedDevices",
l["Menu:UnknownUnlinkedDevices"],
"/unknownunlinkeddevicesgrid",
icon: "fa fa-laptop",
order: 10
);
context.Menu.AddItem(unknownDevicesMenu);
On this option, if I navigate to another menu, it updates the menu. But, it doesn't update when the property is set.
Try 2: I've used IMenuManager to get the menu and then update the DisplayName property. Even navigating to another menu it doesn't update the name displayed.
private async Task UpdateMenu()
{
Console.WriteLine("UpdateMenu Init");
var menu = await MenuManager.GetAsync("UnknownUnlinkedDevices");
if (menu != null){
Console.WriteLine("UpdateMenu Updating menu: {0}", SelectedUnits.Length);
menu.DisplayName = $"Units Selected {SelectedUnits.Length}";
}
}
Is there some way to do that?
Hi,
After updating my solution to ABP.IO version 5.0.0 and installing VS 2022 with the new .NET Core 6, I'm experiencing constant issues with hot reload, that hasn't worked so far, the IDE is very slow, especially when trying to access IntelliSense, and it has been crashing a lot. I can see that sometimes the processor is around 85% or more and VS 2022 is using more than 7GB of RAM.
I saw the hot reload working on some pages, but, it doesn't work on most of the pages. It takes longer to tell me that I need to restart the application, then it will build the solution and reload the web browser. My productivity has been decreased a lot after upgrading my environment.
Is anyone else experiencing those kinds of issues as well? What I can do to improve the performance and to get the Hot Reload working?
Kind regards, Leonardo Willrich.
Hi,
Intellisense is very slow when running on Blazor WebAssembly project. I am only experiencing it on ABP.IO solution and in the Blazor project, in the Application project and the others it works fine!
Is someone else experience the same? Is there some trick to improve that?
It is really anoying and I really would like to have that working properly.
Hi,
I was wondering how can I set on production the log level as per microsoft document (https://docs.abp.io/en/abp/latest/Logging).
I realized that in my local development environment, target = Debug, it shows [DBG] lines in the log (Host\Logs). But, in productions or test environment where I have published and deployed the solution as target = Release, I cannot see those lines.
Also, the log file is just one and it is getting bigger and bigger. Is that possible to split in several files and define a limit size for each file? In Log4Net that is possible, but, reading the microsoft doc I am not sure how to do that.
That is the config that I've added into appsettings.json, but it makes no difference.
Hi,
I've added some properties dynamically in the Tenant form. But, for the boolean fields, if the user don't tick then, when saving the form it says that the field is mandatory. The user has to tick and untick the field to be able to save. It seems that the default value is null, but my property is non-nullable.
Framework: Blazor WASM version 4.3.2