This error seems to be based on the server you are hosting. Even if you solve the problem in your localhost, you'll need to configure maxAllowedContentLength
on the server you are hosting the application.
You can configure the Kestrel in Program.cs
like:
var builder = WebApplication.CreateBuilder(args);
builder.WebHost.ConfigureKestrel(opt => opt.Limits.MaxRequestBodySize = long.MaxValue); // Add this line
builder.Host
.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<BServerBlazorModule>();
var app = builder.Build();
Also if you are running on IIS, update Web.config with:
<configuration>
<system.web>
<httpRuntime maxRequestLength="2147483647" />
</system.web>
</configuration>
Entered numbers are in bytes, configure as you desire.
You can also check HTTP Error 413.1 - Request Entity Too Large - How to fix.
Can you trace the http request from the blazor application by checking the logs? Check the blazor logs: Is your request made to the RemoteService:Default URL which is configured in the appsettings.json (that should be web-gateway)? Check the web-gateway logs: Is your request made here and getting redirected to microservice? Check your microservice logs: Is your request made here and returned 404?
Based on our custom requirement we had to include the custom page and controller with in Web application(MVC) and those controller/page can't be placed in any of the micro services or in web gateway.
Then, where are you hosting these pages?
We don't want to have anonymous access for those controller/page. So we would like to know what are the parameters (Cookies/Headers) need to be passed to the respective page to access those as a Authenticated user. Please advise.....
I can't say that I understand what you mean. Do you have a controller method returning a page with an [Authorize] attribute and you want to call this from an external service (like a .NET or Java application)?
There are authorization flows for these kinds of interactions. If you are making a request without a user (backend-to-backend) you need to configure a Client Credentials authentication. Or if it is related with user that needs to be logged in, you can use Authorization Code or Hybrid flow.
Eventually, behind the scenes, you request an access token and this is added to the authorization header as Bearer and the request is made.
This seems a custom solution that we can not guide you through. However, we made and keep making lots of improvements to the microservice solution template where we provide solutions for distributed system challenges.
I can suggest a consultancy request for porting your existing solution to the supported microservice solution template though.
Do you mean something like this?
If you are using dynamic proxying, your gateway must depend on the microservice HttpApi layer.
So, you will need add project reference to gateway references and depends on attributes to gateway module.
I have reproduced the problem.
I'll create an internal issue and fix it in the next patch hopefully.
Thank you for your report.
Intercepting Blazor Page events issue is open for more than 1 year by Microsoft and it is directly related to it.
We are also trying to figure out a different way to solve this problem however we are pretty limited on tools to use on Blazor side.
You can also follow the progress at issue#11682.
implement front-channel or back-channel logout mechanism to the external identityserver already exists but how call SignOut("cookies","oidc"); in abp identityserver.
It is a mechanism. You don't call signout manually. You return a LoggedOutView
that includes iframe that calls the callback of the other clients.
Then you need to specify which client is enabled the front channel and on which endpoint.
See the links I have shared above.
You can ABP commercial migration guides. We have added v4.x to 5.2 microservice migration guide.
We'll add migration guides for microservices from now on.