小编twr*_*nol的帖子

blazor.web assembly.js 出现 404 NotFound(_framework 文件未找到)

我们沿着这条线搜索了其他问题,发现它们似乎适用于站点部署后。当尝试调试时,VS 2019 中会发生这种情况。到目前为止我们已经检查的内容包括:

applicationhost.config 似乎是正确的,虚拟目录路径确实是“客户端”应用程序的根目录,而 wwwroot 文件夹是物理路径的子文件夹。

 <site name="Eclypses.MTE.Protoype.Server" id="8">
    <application path="/" applicationPool="Eclypses.MTE.Protoype.Server AppPool">
      <virtualDirectory path="/" physicalPath="D:\git_src\mteutils_dotnetcore\eclypses-commander-prototype\Eclypses.MTE.Prototype\Client" />
    </application>
    <bindings>
      <binding protocol="http" bindingInformation="*:50413:localhost" />
    </bindings>
  </site>
Run Code Online (Sandbox Code Playgroud)

我们在服务器启动时记录一条信息消息,它确实出现在我们的日志文件中。

客户端的 launchsettings.json 文件是:

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:50413",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "use64Bit": true,
      "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
    },
    "Eclypses.MTE.Prototype": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "https://localhost:5001;http://localhost:5000",
      "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
    } …
Run Code Online (Sandbox Code Playgroud)

c# webassembly blazor .net-5

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

.net-5 ×1

blazor ×1

c# ×1

webassembly ×1