在 StartUp 中的 Configure 方法添加如下代码即可

app.UseStaticFiles(new StaticFileOptions()
{
    ContentTypeProvider = new FileExtensionContentTypeProvider()
    {
        Mappings = {[".exe"] = "application/octect-stream"}
    }
});

原因是默认没有 exe 的 content-type。

相关文章:

  • 2021-07-10
  • 2021-06-11
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-29
  • 2022-01-12
  • 2021-11-29
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案