Is there a way to set MaxRequestBodySize for out-of-process deployment mode similar to IISServerOptions for in-process?

129 Views Asked by At

When I try publishing the web api and deploying on my local iis, the setting below works

var builder = WebApplication.CreateBuilder(args);
builder.Services.Configure<IISServerOptions>(options => options.MaxRequestBodySize = 12000);

But in the server it doesn't work. I noticed that the deployment mode in web.config is different between my local and the server.

In my local:

hostingModel="inprocess"

while in the server it is:

hostingModel="OutOfProcess"

The IISServerOptions is for in-process. What should be the equivalent setting of MaxRequestBodySize that I should apply for out-of-process?

0

There are 0 best solutions below