azure-web-app-service - 将 ASP.NET Core 5 应用程序从 Windows 移动到 Linux 后出现 InvalidCastException
问题描述
将我的 ASP.NET Core 5 应用程序从 Azure Windows 应用程序服务移动到 Linux 应用程序服务后,我几乎在所有端点上都收到了这些错误:
InvalidCastException(无法将“System.Int32”类型的对象转换为“System.String”类型。
无法将“System.Guid”类型的对象转换为“System.String”类型。等)
SqlNullValueException
移回 Windows 后一切正常。
使用 EF Core 5 和 SQL Azure。我想相信这不是某种 .NET Core 错误,我只是缺少一些配置,因为从 Windows 迁移到 Linux 很常见。
解决方案
似乎是因为应用服务计划太弱了。应用服务计划扩大后一切正常。
推荐阅读
- javascript - 从具有相同突变的另一个方法调用方法
- javascript - 星火AR v98 | JavaScript 错误:意外的场景对象引用
- git - How to know if a Git repository has submodules before it is cloned?
- python - Python 每 60 秒调用一次函数
- oracle - 在 Oracle 11gR2 中,如何使用 NESTED TABLE 创建“Type with NESTED TABLE”的表?
- php - 下载 .php 文件而不执行
- html - 单击链接时删除的菜单
- javascript - 无法通过 node.js 中的 socket.io 发送 Set() 对象
- java - Spring-boot 应用程序启动在 Intellij BeanInstantiationException 中失败 - 在 Eclipse 中有效
- redis - 如何让 Redis 哨兵忘记主人?