简体   繁体   中英

IIS 7.5 404 not found for ASP.NET MVC application

I've seen many similar situations posted here, but none of which exactly match mine and, unfortunately, none of which had answers that resolved my issue. So, here goes nothing.

For starters, my new MVC frontend and WebAPI projects work just fine when running on my local PC via Visual Studio. The issue is when I try to publish the projects (used multiple methods: msdeploy, ftp, file system copied to server) to the staging server. I know the server is configured correctly because I have several other WebUI(MVC)/WebAPI applications running on the same server, deployed the exact same way, using the exact same technology stack (down to the version). Here is what I've tried so far:

  • I have verified that the application is deployed into the correct folder on the server and that the virtual path --> application in IIS is pointed to the correct physical location
  • I have verified that the application is set to use a dedicated app pool running in asp.net 4.0 integrated mode under applicationpoolidentity
  • The IUSR user and identity for the application pools have been granted read/execute access to the virtual path and all subfolders/files
  • I have tried the proposals I have seen here regarding using verb="*" for the ExtensionlessUrlHandler-Integrated-4.0 handler in the web.config file but it didn't work
  • The IIS log shows the 404 error as 404 0 0 62; looking up the win32 status code (62) provides: "space to store the file waiting to be printed is not available on the server" which does not seem applicable to my situation (retrieved here )

Below is a (redacted) copy of the output in the IIS log file:

2015-01-16 17:54:59 X.X.X.X GET /Accounts/Alpha/ - 443 - X.X.X.X Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/39.0.2171.95+Safari/537.36 - 404 0 0 62

This is happening whether I try to access the URL via the server itself (tried FQDN and localhost) or my development machine. There are no errors in the Event Log on the machine relevant to IIS. If anyone could offer some additional insight, I would very much appreciate it as this is driving me up a wall. I don't understand how it could be working for all of the other applications on the server yet I can find no differences in configuration.

Thanks in advance!

This has bitten me a couple of times.

<system.webServer>
    .....
    <modules runAllManagedModulesForAllRequests="true" />
    .....
</system.webServer>

Maybe try something like

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="BundleModule" />
      <add name="BundleModule" type="System.Web.Optimization.BundleModule" />
    </modules>
</system.webServer>

尝试将html文件放到目录中并访问它,如果无法访问它,那么肯定与您的部署设置或IIS有任何问题有关,请尝试重新创建目录结构:)希望对您有所帮助。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM