I started the "AuthenServer", "HttpApi. Host", and "Blazor. Server. Host" services. Then log in to the 'admin' user on the page. “Blazor. Server. Host" calls the interface through "HttpApi. Client": Unable to obtain the current logged in user information in the interface. How can I obtain the logged in user information for calling the interface? If you need debugging, how can I send you the demo project?
realmaliming@qq.com
Successfully sent
I have not received it yet.
liming.ma@volosoft.com
The email has been returned, and the attachment is only 50M in size. Prompt error:the mta server of volosoft.com -- aspmx.l.google.com(142.250.157.26) reply:552 5.2.3 Your message exceeded Google's message size limits. Please visit https://support.google.com/mail/?p=MaxSizeError to view our size guidelines. l192-20020a6391c9000000b005347ef6ec11si198010pge.760 - gsmtp at 2023-05-31 11:48:50
hi
Can you test the code in an opensource template project and share it again?
abp new BookStore -t module
The new project has been sent to you.
hi
I think there is a problem with Blazorise. You can use the asp net core way to upload the files.
https://learn.microsoft.com/en-us/aspnet/core/blazor/file-uploads?view=aspnetcore-7.0&pivots=server
I have tried this method and the same error occurred.
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 thenode_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.