Activities of "cunyong.yu@vskysoft.com"

The code for ReadExcel. razor is as follows:

@page "/upload-excel"
@using System.IO

`<Field>
    <FileEdit Changed="@OnChanged" />
</Field>`

@code {
    async Task OnChanged(FileChangedEventArgs e)
    {
        try
        {
            var file = e.Files.FirstOrDefault();
            if (file == null)
            {
                return;
            }

            using (MemoryStream result = new MemoryStream())
            {
                await file.OpenReadStream(long.MaxValue).CopyToAsync(result);
            }
        } catch (Exception exc)
        {
            Console.WriteLine(exc.Message);
        } finally
        {
            this.StateHasChanged();
        }
    }
}

This is just a simple function of selecting a local Excel file and reading it.

Some source files of your project are broken. Please fix it and share again(run abp clean and remove the node_moduels). Thanks

Sorry, my project has been encrypted by company software. In fact, this is just an empty ABP module project. You can create one locally and then copy the file "ReadExcel. razor" to open it, which can reproduce the error.

Which project?

AbpBlazorDemo.Blazor.Server.Host.

Can you share a template project that reproduces the problem?

I have sent you an email with a template project attachment, please check it.

hi

Set EnableDetailedErrors in AddHubOptions to see detail errors.

builder.Services.AddSignalR(hubOptions => 
 { 
     hubOptions.EnableDetailedErrors = true; 
 }); 

I set this in the program. cs of Blazor. Server. Host, but it is still the same error. Where can I go to see the detailed information?

I've created a component for reading Excel files that works fine in a blank Blazor project, but when I add it to a Blazor project based on ABP Framework, I get an error message saying 'Invocation provides 4 argument(s) but target expects 3.' Could you please help me understand why this happens and how to fix it? Thank you!"

The following is my code.

@page "/upload-excel"
@using System.IO

<Field>
    <FileEdit Changed="@OnChanged" />
</Field>

@code {
    async Task OnChanged(FileChangedEventArgs e)
    {
        try
        {
            var file = e.Files.FirstOrDefault();
            if (file == null)
            {
                return;
            }

            using (MemoryStream result = new MemoryStream())
            {
                await file.OpenReadStream(long.MaxValue).CopyToAsync(result);
            }
        } catch (Exception exc)
        {
            Console.WriteLine(exc.Message);
        } finally
        {
            this.StateHasChanged();
        }
    }
}
  • ABP Framework version: v7.1.0
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:System.IO.InvalidDataException HResult=0x80131501 Message=Invocation provides 4 argument(s) but target expects 3. Source=Microsoft.AspNetCore.Components.Server StackTrace: 在 Microsoft.AspNetCore.SignalR.Protocol.MessagePackHubProtocolWorker.BindArguments(MessagePackReader& reader, IReadOnlyList`1 parameterTypes)
  • Steps to reproduce the issue:"open the page
Zobrazeno od 21 do 26 z celkem 26 záznamů
Made with ❤️ on ABP v8.2.0-preview Updated on března 25, 2024, 15:11