且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

找不到blazor.server.js文件

更新时间:2023-11-20 20:03:22

就我而言,

app.UseStaticFiles(new StaticFileOptions
{
    ServeUnknownFileTypes = true,
    DefaultContentType = "application/octet-stream"
});

是导致问题的原因.替换为:

is what caused the issue. Replace it with:

app.UseStaticFiles();

解决了问题.我发现问题可能出在DefaultContentType上.

solved the problem. I figured maybe DefaultContentType is where the problem is.

任何人都知道为什么会发生这种情况,请更新此答案.

Anyone knows better why that is the case please update this answer.