Closed
Description
I hope all files in a specified folder can be download, so I did this:
var provider = new FileExtensionContentTypeProvider();
provider.Mappings[".config"] = "application/octet-stream";
app.UseStaticFiles(new StaticFileOptions()
{
FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "xxx")),
RequestPath = "/xxx",
ServeUnknownFileTypes = true,
DefaultContentType = "application/octet-stream",
ContentTypeProvider = provider,
});
it work well for .exe|.dll
, except .config
, got this:
Please help.