You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Azure Web App and I use the file server feature from code. I have 4 files in a directory of the file server, but only 3 files are shown in the website. The bigger file than 30Mb is wrong. xxxxxxxx.Client2.Windows_1.0.18619.18338_x64.msix (37Mb).
Below I copied all the snippets which I use in my code. What else should I use to show this file?
FYI: When the code runs from Visual Studio at localhost, the files are shown without problem.
The environments are:
Live Azure Subscription with Dotnet - v8.0 runtime stack (with 6.0 is the same.)
Visual Studio 2022 64bit (17.11.2) - now is the latest
My files in the wwwroot FTP:
Files shown in the HTTP website:
I have the following code:
FileServerOptions fso = new FileServerOptions
{
FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider([RootAbsolutePath]),
RequestPath = new PathString("/" + [RequestPath]),
EnableDirectoryBrowsing = true,
EnableDefaultFiles = false,
};
fso.StaticFileOptions.ServeUnknownFileTypes = true;
app.UseFileServer(fso);
My code has the following snippets:
Startup.cs:
public void ConfigureServices(IServiceCollection services)
{
services.Configure<Microsoft.AspNetCore.Http.Features.FormOptions>(x =>
{
x.ValueLengthLimit = int.MaxValue;
x.MultipartBodyLengthLimit = int.MaxValue; // if don't set default value is: 128 MB
x.MultipartHeadersLengthLimit = int.MaxValue;
});
services.Configure<IISServerOptions>(options =>
{
options.MaxRequestBodySize = int.MaxValue;
});
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
I have an Azure Web App and I use the file server feature from code. I have 4 files in a directory of the file server, but only 3 files are shown in the website. The bigger file than 30Mb is wrong.
xxxxxxxx.Client2.Windows_1.0.18619.18338_x64.msix
(37Mb).Below I copied all the snippets which I use in my code. What else should I use to show this file?
FYI: When the code runs from Visual Studio at localhost, the files are shown without problem.
The environments are:
My files in the wwwroot FTP:
Files shown in the HTTP website:
I have the following code:
My code has the following snippets:
Startup.cs:
web.config:
Program.cs:
Beta Was this translation helpful? Give feedback.
All reactions