开发者

HTTP Error 404.0 - Not Found IIS7 and MVC app

I am getting the above error when I browse to the following location on my local box using Windows 7:

mysite.mobi is in my localhosts file and resolves to 127.0.0.1

This produces 404 error: http://mysite.mobi/Home/Index

This loads up ok though so IIS7 is working to some extent: http://mysite.mobi/Content/Test.htm

If I run the M开发者_运维技巧VC site straight from VS2010 using the inbuilt Development server it works fine. I copied my site into wwwroot and set-up IIS7 to point to it using AppPool with .NET4 framework and integrated pipeline.

What have I missed? It seems like /Home/Index isn't invoking the controller for some reason.


Make sure you have the following section in your web.config:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜