Activities of "improwise"

This is the last output from ABP Suite you get

Building....: (1/1)M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\TEST.Blazor.csproj Executing...: dotnet build M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\TEST.Blazor.csproj MSBuild version 17.3.0+92e077650 for .NET Determining projects to restore... Restored M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Application.Contracts\TEST.Application.Contracts.csproj (in 1,55 sec). Restored M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.HttpApi.Client\TEST.HttpApi.Client.csproj (in 2,1 sec). Restored M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\TEST.Blazor.csproj (in 7,44 sec). 1 of 4 projects are up-to-date for restore. TEST.Domain.Shared -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Domain.Shared\bin\Debug\netstandard2.0\TEST.Domain.Shared.dll TEST.Application.Contracts -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Application.Contracts\bin\Debug\netstandard2.0\TEST.Application.Contracts.dll TEST.HttpApi.Client -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.HttpApi.Client\bin\Debug\netstandard2.0\TEST.HttpApi.Client.dll TEST.Blazor -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\bin\Debug\net6.0\TEST.Blazor.dll TEST.Blazor (Blazor output) -> M:\Projects\ASP.NET\ABP\src\TEST\aspnet-core\src\TEST.Blazor\bin\Debug\net6.0\wwwroot

Build succeeded. 0 Warning(s) 0 Error(s)

Time Elapsed 00:00:13.07

Hi,

When you create a new project, the ABP suite will build the project, try to restore libs, and create initial migration files. so yes, it will lock the file and take a while(not long)

You need to wait until these steps are finished, then you can open the solution in VS2022 and do anything.

Yes I know, but in this case that never seems to happen. Have not experienced similar problems with previous versions of ABP Suite before version 6 RC3/4,

Hi,

Could you share the steps to reproduce? thanks.

Hi,

Basically just create a new solution in ABP Suite (Blazor WASM with MAUI mobile in our case), let it complete, then open the solution in VS2022 (both Preview and not Preview) and then try to build it there. You will get a lot of build errors because files are in use. Kill ABP Suite and rebuild and it all works. We have seen this multiple times when we have done some trial and error for other reasons and also with RC3. Maybe RC2 as well but don't remember.

Edit:

No errors from ABP Suite either, and the generated code seems to work fine, when files are not locked anymore.

  • ABP Framework version: 6.0.0-rc4
  • UI type: Blazor WASM
  • DB provider: SQL
    • Tiered (MVC) or Identity Server Separated (Angular): no

It seems ABP Suite 6.0 rc4 (and at least RC3 as well) are locking some files after generation, which leads to error messages when trying to build and not all of them are obvious that it is ABP Suite that is the reason for it, while some contain that information if you looks closely, like "XXXXX Exceeded retry count of 10. Failed. The file is locked by: "Volo.Abp.Suite (36088)"

Killing/restarting the ABP Suite process makes the error go away so it is no doubt about what is causing this, so as long as you know why this is, you can easily work around the problem.

Hi @improwise

As mentioned in article, Secure Storage requires platform-specific configuration. Preferences usage is for development purposes. You should replace it for production.

Even so that should probably be highlighted more than it is today, as I would assume that most people would assume that generated code is "best in class" and being ready for production (as ready as anything MAUI can be).

Just noticed that it was your community post I linked to :)

As I understand it, the MAUI mobile application generated by ABP Suite seem to use Preferences instead of SecureStorage for storing JWT tokens which AFAIK isn't the recommended way of doing it as it is not as secure as SecureStorage. There is even a community post about this

https://community.abp.io/posts/using-abp-client-proxies-in-maui-with-openid-connect-em7x1s8k

private async Task SetTokenCacheAsync(string accessToken, string refreshToken)
{
    await _storage.SetAsync(IssueTrackrConsts.OidcConsts.AccessTokenKeyName, accessToken);
    await _storage.SetAsync(IssueTrackrConsts.OidcConsts.RefreshTokenKeyName, refreshToken);
}

private async Task ClearTokenCacheAsync()
{
    await _storage.RemoveAsync(IssueTrackrConsts.OidcConsts.AccessTokenKeyName);
    await _storage.RemoveAsync(IssueTrackrConsts.OidcConsts.RefreshTokenKeyName);
}

public class DefaultStorage : IStorage, ITransientDependency
{
    public Task<string> GetAsync(string key)
    {
        return Task.FromResult(Preferences.Get(key, string.Empty));
    }

    public Task SetAsync(string key, string value)
    {
        Preferences.Set(key, value);
        return Task.CompletedTask;
    }

    public Task RemoveAsync(string key)
    {
        Preferences.Remove(key);
        return Task.CompletedTask;
    }
}

Add support for MAUI Blazor (BlazorWebView) in the ABP Suite Mobile Application (don't remember exactly what it is called). MAUI is supported but only as XAML. As I understand it, authentication is supposed to be handled in the XAML even when using mainly Blazor, so the changes needed would probably be quite small.

Authentication in Blazor Hybrid apps is handled by native platform libraries, as they offer enhanced security guarantees that the browser sandbox can't offer. Authentication of native apps uses an OS-specific mechanism or via a federated protocol, such as OpenID Connect (OIDC). Follow the guidance for the identity provider that you've selected for the app and then further integrate identity with Blazor using the guidance in this article.

https://docs.microsoft.com/en-us/aspnet/core/blazor/hybrid/security/?view=aspnetcore-6.0&pivots=maui

Perhaps a better alternative could be to switch to MAUI Blazor project type instead of a plain MAUI one, since the former support Xaml AND Blazor, while the normal MAUI only supports Xaml and requires quite a bit a configuring to get Blazor working.

Since ABP is primarilly a web framework, it would seem reasonable that anyone using ABP is more likely to use Blazor than XAML, as anyone interested in writing native apps only probably would not be using ABP at all.

Hi, you probably tried to update ABP Suite without all related packages being released. Can you try again?

What is the ABP Suite to be used with RC4?

You can update the ABP Suite to RC.4. Your CLI version and ABP Suite version should be the same.

Hi,

Yes, it seems to be working now so I guess it was a configuration error on the "server side". Thanks.

I guess that normally there would not be a new version available to update to without all the needed packages also being available and released?

I tried to update to ABP Suite matching the latest RC 6.0.0 RC4 but that did not seem to exist (and instead installed some Preview 7 from July even though I specified the version in the CLI command). So I did a "abp suite remove" and also deleted the directory, and then did a "abp suite install --version 6.0.0-rc.3". Now I seem to have a mismatch of versions, which I would assume is rather the ABP Suite RC3 having some incorrect INF

abp suite install --version 6.0.0-rc.3 [18:36:35 INF] ABP CLI (https://abp.io) [18:36:36 INF] Version 6.0.0-rc.4 (Prerelease) [18:36:36 INF] Installing ABP Suite v6.0.0-rc.3... You can invoke the tool using the following command: abp-suite Tool 'volo.abp.suite' (version '6.0.0-rc.3') was successfully installed.

abp suite [18:37:01 INF] ABP CLI (https://abp.io) [18:37:01 INF] Version 6.0.0-rc.4 (Prerelease) Starting Suite v6.0.0-rc.3 ... Opening http://localhost:3000

What is the ABP Suite to be used with RC4 and is there a ABP Suite RC4 as well?

Add support for MAUI Blazor (BlazorWebView) in the ABP Suite Mobile Application (don't remember exactly what it is called). MAUI is supported but only as XAML. As I understand it, authentication is supposed to be handled in the XAML even when using mainly Blazor, so the changes needed would probably be quite small.

Authentication in Blazor Hybrid apps is handled by native platform libraries, as they offer enhanced security guarantees that the browser sandbox can't offer. Authentication of native apps uses an OS-specific mechanism or via a federated protocol, such as OpenID Connect (OIDC). Follow the guidance for the identity provider that you've selected for the app and then further integrate identity with Blazor using the guidance in this article.

https://docs.microsoft.com/en-us/aspnet/core/blazor/hybrid/security/?view=aspnetcore-6.0&pivots=maui

Showing 51 to 60 of 117 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11