开发者

MVC3 site deployed on IIS6 stops working after 20 minuttes with 404 Not Found

开发者 https://www.devze.com 2023-03-11 18:12 出处:网络
I\'ll try to make this short, feel free to ask for more details. A mobile edition a a web-site has been created using MV3 razor and deployed to an IIS6 web-server using extenstionless URL\'s. Since .

I'll try to make this short, feel free to ask for more details.

A mobile edition a a web-site has been created using MV3 razor and deployed to an IIS6 web-server using extenstionless URL's. Since .NET4 is installed on the server there 开发者_Go百科is no special configuration done on the server to get extensionless urls work. When I try to access the site with the URL: http://site/m/ i get a 404 Not Found error.

What I do to produce this problem:

  1. Right-click on project in VS2010 and publish to local file system.
  2. ZIP all files in and transfer to production server + unzip there
  3. Right click on production web-site and add a virtual directory for the new application
  4. Create a new application pool with all default settings
  5. Put the new virtual directory/application in that application pool
  6. Try to access the URL in the browser; receive 404 Not Found

The thing that puzzles me, is that if I replace Step 1 with "File->Create New MVC3 Project" and then publish to local file system everything works fine:

  1. The test-project is displayed in the browser with the name i used http://site/mvctest/
  2. I do not need to use any extensions
  3. It does not stop working after 20 minutes (see next paragraph)

And now for the (even) weirder part:

If I now move the "m" application into the application pool just created for the "mvctest" application; it works too. But only for 20 minutes (or whatever value I have set for "Shutdown worker process after being idle for").

Any ideas?

EDIT: If I add wildcard mapping to the /m/ virtual directory it works, but that should/could also affect performance in a bad way?


it sounds like your first scenario the handler isn't setup to handle the mvc requests. IIS 6 needs to be integrated or an extension for MVC mapped. Set the app pool up to run in integrated pipeline mode. What happens then? This should work. Also check the event log for rapid fail protection kicking in because of worker process resets.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号