views:

739

answers:

6

Hi there,

Actually, I am developing a website using ASP.Net MVC 3.5. 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, the Not Found (404.0) errors comes. All this happens when the application is deployed on ISS 7. It works fine during development, but after deployement, none of the controller are found when called through jQuery.get method or post.

Thanking you all in advance for helping me.

A: 

is the error an asp.net error (yellow and red) or the default iis7 html error? if its iis7 default error, make sure IIS7 has asp.net installed, that caught me out when i first started working with it. (programs and features and add windows components and make sure asp.net is selected under IIS)

Darko Z
A: 

Actually, the website is running, I can navigate among pages, only if there is a call through jQuery.get or post methods, then the error occurs. I guess, there is an issue with ISS 7 regarding recognizing that its a controller method. The error text is given below.

HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable .

Thanks.

A: 

If you are running ASP.NET MVC on IIS7, make sure you configure IIS to run in "Integrated Pipeline Mode" as opposed to "Classic". You'll have more success with routing in this mode. More here.

LordHits
A: 

Can you type any controller/action URL in the address bar and have a page work?

Tony Borf
A: 

Make sure you have ASP.NET MVC installed and running. Also, make sure that your application is installed properly with appropriate references.

Like Tony says above, make sure you can actually access the complete URI (controller/method) in a browser to see if it works ok.

what is the URL that the jQuery.get method is accessing?

If it does, check how you have wired your Ajax call.

Do the method in your code have the AcceptVerbs attribute defined? [AcceptVerbs(HttpVerbs.Post)]

R N
A: 

If you are deploying your mvc app as a virtual web make sure that BOTH your virtual web and the root site has its Application Pool set as Integrated Pipeline.