Activities of "hinairusu"

Found my solution to the context error post above.,

you need to add in to moduleNameEntityFrameworkCoreModule.cs

context.Services.AddAbpDbContext<FileManagementDbContext>(options =>
        {
            /* Remove "includeAllEntities: true" to create
             * default repositories only for aggregate roots */
            options.AddDefaultRepositories(includeAllEntities: true);
        });

 Configure<AbpDbContextOptions>(options =>
        {
            options.Configure<FileManagementDbContext>(c =>
            {
                c.UseSqlServer(b =>
                {
                    b.MigrationsHistoryTable("__FileManagement_Migrations");
                });
            });
        });

and then create a connection string specifcially called FileManagement.

I've pointed it at the table maintained by my existing DBContext, so hopefully that won't cause any issues down the line.

I can however see the files uploaded by different users:

But I cannot see the API request in the console as expected from the posts above. Could this be because I'm using Blazor Server rather than WASM?

I've also noticed a bug, in which if you re-open the upload box after uploading you get a shadow entry still:

Clicking the Browse button once clears the entry but doesn't open the browse structure.

Thank you for the help so far, finally starting to make progress!

I missed a line for the audience when implementing it, That's now been fixed and the page loads. However, after a few moments it throws a new error:

[file-upload_f2322b15-f]: [10:51:08 ERR] An exception was thrown while activating Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext, Volo.FileManagement.EntityFrameworkCore, Version=7.2.2.0, Culture=neutral, PublicKeyToken=null]].
[file-upload_f2322b15-f]: Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext, Volo.FileManagement.EntityFrameworkCore, Version=7.2.2.0, Culture=neutral, PublicKeyToken=null]].
[file-upload_f2322b15-f]: ---> Volo.Abp.AbpException: No configuration found for Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore, Version=7.0.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60! Use services.Configure<AbpDbContextOptions>(...) to configure it.
[file-upload_f2322b15-f]: at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Configure[TDbContext](AbpDbContextOptions options, AbpDbContextConfigurationContext`1 context)

I assume therefore that it is expecting a specific DB context, but it doesn't say anything about implementing that (https://docs.abp.io/en/commercial/latest/modules/file-management) But following the instructions I have the following:

using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.FileManagement.EntityFrameworkCore;

namespace DragonsHoard.FileUpload.EntityFrameworkCore;

[ConnectionStringName(FileUploadDbProperties.ConnectionStringName)]
public class FileUploadDbContext : AbpDbContext&lt;FileUploadDbContext&gt;
{

    public FileUploadDbContext(DbContextOptions&lt;FileUploadDbContext&gt; options)
        : base(options)
    {

    }

    protected override void OnModelCreating(ModelBuilder builder)
    {
        base.OnModelCreating(builder);

        builder.ConfigureFileUpload();
        builder.ConfigureFileManagement();
        }
}

Why isn't it using the context I have set up, and how do I repoint it to use the context I have? If I can't, do I need to set up a second context for the prebuilt?

In case it becomes relevant at all / later I've got it set to push files to DB at the moment.

public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAutoMapperObjectMapper&lt;FileUploadApplicationModule&gt;();
        Configure&lt;AbpAutoMapperOptions&gt;(options =>
        {
            options.AddMaps&lt;FileUploadApplicationModule&gt;(validate: true);
        });
        
        Configure&lt;AbpBlobStoringOptions&gt;(options =>
        {
            options.Containers.ConfigureDefault(c =>
                c.UseDatabase());
            options.Containers.Configure&lt;FileManagementContainer&gt;(c =>
            {
                c.UseDatabase(); // You can use FileSystem or Azure providers also.
            });
        }); 
    }

And upon a reload:

It appears that the nugets have updated however: But the EFCore nuget is on two different versions in the solution.

a)

Please check the permissions of admin user. Please check the logs of api&authserver.

b)

it returns a fault

Please share the details logs.

c)

I guess you need update it yourself. The suite can't handle the microservice very well.

d)

You can override the application services of FM module. See the API request on browser console.

e)

See the file uploda request on browser console.

I suggest you consider upgrading your license to get the source code of the modules.

: )

a) Dropbox link for Auth Logs:https://www.dropbox.com/s/05epchpbe8cfhta/Auth-Server-Logs.txt?dl=0 Dropbox link for File Upload Logs: https://www.dropbox.com/s/5z70tgyme3kqmnn/File-Upload-Logs.txt?dl=0

b) [blazor_d73061ee-6]: [16:12:49 FTL] DragonsHoard.Blazor terminated unexpectedly! [blazor_d73061ee-6]: Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.AspNetCore.Components.WebAssembly.AbpAspNetCoreComponentsWebAssemblyModule, Volo.Abp.AspNetCore.Components.WebAssembly, Version=7.2.1.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. [blazor_d73061ee-6]: ---> System.InvalidOperationException: Could not find singleton service: Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder, Microsoft.AspNetCore.Components.WebAssembly, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.ServiceCollectionCommonExtensions.GetSingletonInstance[T](IServiceCollection services) [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.AbpWebAssemblyServiceCollectionExtensions.GetHostBuilder(IServiceCollection services) [blazor_d73061ee-6]: at Volo.Abp.AspNetCore.Components.WebAssembly.AbpAspNetCoreComponentsWebAssemblyModule.ConfigureServices(ServiceConfigurationContext context) [blazor_d73061ee-6]: at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) [blazor_d73061ee-6]: at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() [blazor_d73061ee-6]: --- End of inner exception stack trace --- [blazor_d73061ee-6]: at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() [blazor_d73061ee-6]: at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action 1 optionsAction) [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action 1 optionsAction) [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action 1 optionsAction) [blazor_d73061ee-6]: at DragonsHoard.Blazor.Program.Main(String[] args) in C:\Users\slink\source\repos\Nezuban\DragonsHoard\apps\blazor\src\DragonsHoard.Blazor\Program.cs:line 27

c) I have updated the ocelot to include the file-management url's.

d & e) Could I have a link to this please?

While I'd love to upgrade to get access to the source code, and believe me it's pretty high on our priorites as we know how much not having it is hurting our ability to support ourselves on this, it's just not possible for our startup to get that sort of funding together. We pulled together for the individual commercial licence because we was hoping that the three modules we really needed would function out of the box. So far one has.

We want to, Don't get me wrong. The additional developer seat alone would help us out immensely, but $6k is just way beyond us right now.

That appears to have resolved the problem of the versioning, thank you. I'll keep an eye out for the next update and see if it still hangs when it runs.

Thank you, I'll update the JSON and see if that resolves the issue!

@Alper, The first thought I had was to try and remove and re-add the project, hence the date is so far apart - it was initially added alongside the product and identity service etc.

https://support.abp.io/QA/Questions/5072/File-Management-implementation-issues-and-questions

https://support.abp.io/QA/Questions/5071/Authentication-token-duration-Desync-redirecting-after-expiriation

https://support.abp.io/QA/Questions/5070/ABP-Suite-not-identifying-version--hanging-when-updating

I've split them out as requested.

  • ABP Framework version: v7.2.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Yes, Microservice Design

a) For File Management I have a couple of questions. The most important one being how do I remove this Unauthorised (I'm logged in as admin, and the UI says I have permissions) and why is it occuring? [2023-05-15T09:04:40.996Z] Error: Volo.Abp.Http.Client.AbpRemoteCallException: Unauthorized at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase 1.ThrowExceptionForResponseAsync(HttpResponseMessage response) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase 1.RequestAsync(ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase 1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase 1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments) at Volo.FileManagement.Directories.ClientProxies.DirectoryDescriptorClientProxy.GetContentAsync(DirectoryContentRequestInput input) at Volo.FileManagement.Blazor.Pages.FileManagement.FileManagement.GetDirectoryContentAsync() at Volo.FileManagement.Blazor.Pages.FileManagement.FileManagement.OnDirectoryContentDataGridReadAsync(DataGridReadDataEventArgs 1 e) at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Blazorise.DataGrid.DataGrid 1.HandleReadData(CancellationToken cancellationToken) at Blazorise.DataGrid.DataGrid 1.HandleReadData(CancellationToken cancellationToken) at Blazorise.DataGrid.DataGrid 1.Reload(CancellationToken cancellationToken) at Blazorise.DataGrid.DataGrid 1.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

b) Secondly, when I implement FileManagementBlazorWebAssemblyModule as per the docs (using abp add-module Volo.FileManagement, https://docs.abp.io/en/commercial/latest/modules/file-management ) it returns a fault saying that there is not a singleton DB instance (This requirement isn't documented anywhere) but that's resolved by changing the implementation to FileManagementBlazorModule.

c) It's also worth highlighting that installing the file management module does not actually update the Ocelot.json etc, or use the namespace of the module it is installed into (which was another surprise for us)

d) Is it possible to restrict files so that only the person who has uploaded the file can see it? I don't have access to the source code, so I don't know what methods I can overwrite, or where I should be doing so to implement it if this is possible

e) Last question I have around File Management, Is there an example of the endpoints that the page calls so I can make other pages point at the upload, as the entire UI is hidden inside the Nuget. We would like to enable upload from a different page, and use the page the module provides for administrator users as it can see everything (or so it seems so far)

  • ABP Framework version: v7.2.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Yes, Microservice Design

We have noticed that the default authentication timeouts between our modules don't seem to match up.Our main Blazor page will allow login, at which you can access our library service (different module) and our base pages. After a while (I think it's an hour or so, unsure as to the exact timings) the library module will return Unauthorised, but the main blazor page is still logged in and running. We also noticed that after a longer while (usually the next day) it shows the user as logged in on the right, but none of the authenticaed menus are present, meaning they are not actually logged in at all.

Example of total expiration: And after logging out and back in:

Sadly I don't have an example to hand of just the one module falling out of Sync

How/Where do we sync up these authentication times?

How do we send the user to the login page automatically if it has expired?

  • ABP Framework version: v7.2.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Yes, Microservice Design

ABP Suite is showing incorrectly on our SaaS module for it's version, as it displays no module versioning, and if we try to run either a nuget or full update it just hangs. I have tried removing and re-adding it to suite, seleting the .suite folder and letting suite recreate it, nothing seems to work. How do we fix this?

Showing 51 to 60 of 86 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13