ASP MVC on IIS6

徘徊边缘 提交于 2020-01-05 08:29:56

问题


In our asp mvc application, we are using embedded views, images and css files. On deploying on IIS6, the views are being rendered but we are having problem with the images and css files. We are getting 404 not found error.

The same application on UltiDev Cassini Web Server is working fine. The problem seems to be with IIS6. Any kind of advice / help on this topic will be greatly appreciated.


回答1:


Are you telling IIS to handle all requests via the ISAPI filter? It wasnt clear if this had been done in your configuration. If not, this is needed on an MVC application in IIS6...

  1. Go into IIS manager.
  2. Select your website then properties.
  3. Home Directory
  4. Configuration

Then Insert a wildcard application map.

Set it to [star].[star] and set the executable to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

UNTICK "verify file exists".

That will make IIS6 push all requests for any file type through the ISAPI filter. The downside is performance but there are posts on SO to tell you how to write a better handler for your MVC application.



来源:https://stackoverflow.com/questions/2184990/asp-mvc-on-iis6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!