我有一个在开发环境中工作的 MVC4 WebApi 项目,但在部署到生产环境时出错。执行 POST 时出现 httperror 405,执行 GET 时出现 404 错误。我知道问题是我的路线由错误的模块提供服务,但无法弄清楚出了什么问题。
这是 POST 的失败请求日志
ModuleName DirectoryListingModule
Notification 128
HttpStatus 405
HttpReason Method Not Allowed
HttpSubStatus 0
ErrorCode 2147942401
ConfigExceptionInfo
Notification EXECUTE_REQUEST_HANDLER
ErrorCode Incorrect function. (0x80070001)
这是 GET 的失败请求日志
ModuleName IIS Web Core
Notification 16
HttpStatus 404
HttpReason Not Found
HttpSubStatus 0
ErrorCode 2147942402
ConfigExceptionInfo
Notification MAP_REQUEST_HANDLER
ErrorCode The system cannot find the file specified. (0x80070002)
我在板上尝试了许多解决方案,但没有一个能解决我的问题。我的环境是Server 2008 R2,IIS7,我重新安装了.Net 4.0 framework,MVC 4。没有安装WEBDAV,我在web.config中有。我已确保 appPool 在 .net 4.0 下以集成模式运行我还确保已安装所有 Windows 更新。
知道我还能尝试什么吗?非常欣赏。