I have a MVC4 WebApi project working in dev environment, but got error when deploy to production. I got httperror 405 when doing a POST, and 404 error when doing GET. I know that the problem is my route is served by the wrong module, but could not figure out what is wrong.
Here is the failed request log for POST
ModuleName DirectoryListingModule
Notification 128
HttpStatus 405
HttpReason Method Not Allowed
HttpSubStatus 0
ErrorCode 2147942401
ConfigExceptionInfo
Notification EXECUTE_REQUEST_HANDLER
ErrorCode Incorrect function. (0x80070001)
Here is the failed request log for 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)
I have tried many solutions on the board, but none of them fix my issue. My environment is Server 2008 R2, IIS7, I reinstalled .Net 4.0 framework, MVC 4. There is no WEBDAV installed, I have in web.config. I had made sure that the appPool running in intergated mode under .net 4.0 I also made sure that all windows updates are installed.
Any idea what else I could try? Appreciate very much.
User words-like-jared provided in his comment the answer that solved this problem for me. This problem caused me hours of pain and trying several other dead ends. To help others find this solution easily, I am adding this answer so skimmers don't overlook it.
I had a similar problem once but it got solved when we changed the appPool to be ran under Classic mode.
It was NOT the exact same problem as you since we did not try a POST, but we did get the 404 error when performing GETs.
User contributions licensed under CC BY-SA 3.0