开发者

MVC IIS production configuration issue (404)

开发者 https://www.devze.com 2023-03-05 11:08 出处:网络
In my MVC applica开发者_C百科tion I have the following mapping: routes.MapRoute(\"testRoute\", \"services/service.js\", new {controller = \"Home\", action = \"DoWrokTest\"});

In my MVC applica开发者_C百科tion I have the following mapping:

 routes.MapRoute("testRoute", "services/service.js", new {controller = "Home", action = "DoWrokTest"});

I want to return a custom javascript from that call. The problem is that on my localmachine from VS debug it works fine ... but on server I get : 404 - File or directory not found.

Do you know which can be the cause? Do I have to configure IIS in a special way to handle all requests through mvc?


yes you have to do some special configuration if your iis 7.0 runs in classic mode see http://www.asp.net/mvc/tutorials/using-asp-net-mvc-with-different-versions-of-iis-cs

0

精彩评论

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