小编J. *_*Loe的帖子

带有 React 的 ASP.NET Core - 431 请求标头太长

我有一个以dotnet run命令开头的 dotnet 应用程序。我还有一个 React 应用程序,我从yarn start.

当我打开浏览器localhost:3000(反应应用程序所在的位置)时,服务器日志如下所示:

....this goes on for long
 Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js  
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost:5000/build/bundle.js …
Run Code Online (Sandbox Code Playgroud)

asp.net http kestrel-http-server asp.net-core

6
推荐指数
1
解决办法
1637
查看次数

Docker:dotnet ef 数据库更新失败

我刚刚开始在我的项目中使用 EF,docker ef database update当我从项目文件夹本地运行该命令时,该命令运行完美。

但是,当我尝试使用 docker 部署应用程序时,它失败了:

RUN dotnet ef database update

我收到以下错误消息:

An error occurred while accessing the IWebHost on class 'Program'. Continuing without the application service provider. Error: The configuration file 'appsettings.json' was not found and is not optional. The physical path is '/src/WebApp/FileManager.WebApp/bin/Debug/netcoreapp2.2/appsettings.json'.
Unable to create an object of type 'FileManagerDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
The command '/bin/sh -c dotnet ef database update' returned a non-zero code: 1 …
Run Code Online (Sandbox Code Playgroud)

c# entity-framework docker .net-core asp.net-core

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