在部署到IIS 7 ASP.Net MVC控制器导致Not Found错误 [英] ASP.Net MVC Controller causing Not Found error when deployed to IIS 7

查看:217
本文介绍了在部署到IIS 7 ASP.Net MVC控制器导致Not Found错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用ASP.Net MVC网站。我在Home控制器调用时,它返回一个局部视图的方法。问题是,当我打电话使用jQuery控制器的方法,我得到一个404 Not Found错误。

I am developing a website using ASP.Net MVC. I have a method in the Home controller which returns a partial view when called. The issue is when I am calling the controller method using jQuery, I get a 404 Not Found error.

这只是发生在应用程序部署在IIS 7它工作在开发过程中很好,但deployement后,通过jQuery.get方法或交调用时没有控制被发现。

This only happens when the application is deployed on IIS 7. It works fine during development, but after deployement, none of the controller are found when called through jQuery.get method or post.

感谢大家提前帮助我。

推荐答案

我有同样的问题。对我来说,简单的修复是做为aspnet_regiis -r

I had the same problem. The simple fix for me was to do a aspnet_regiis -r

这篇关于在部署到IIS 7 ASP.Net MVC控制器导致Not Found错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆