ASP.NET MVC 4 application web services missing (404 error) on IIS7 / Windows Server 2008

I've written an ASP.NET MVC 4 application, which works on my development machine.  But when I deploy it to a server running IIS7, the controller used for Ajax calls gets a 404 error.  (I published the site to a deployment package, then imported in IIS to create the web application on the server.  The 404 errors can be seen either through FireBug, or by going to the link directly through a browser.  In the code, I'm using jQuery's ajax method and specifying "POST".  Firebug shows that the correct URL is being posted to, but with a 404 error.)

My first inclination was to think that this must be a routing problem, which it may still be.  However, the routing for "normal" pages seems to work.  For example, for the home page, and another page, the controllers and views seem to be working properly.

The difference between the controllers that work and the one that doesn't is that the one used for API-type calls gives 404 errors.  For example, the main page has methods that begin like this:

        public ActionResult Index()
        { //etc...

Open in new window


But the controller having a problem is called API-style (even though it's a regular controller, not a Web API page):

        [HttpPost]
        public JsonResult UnprocessedList()
        { //etc...

Open in new window


The forum postings and articles I've seen so far about this sort of issue seem to focus on configurations to make routing work at all on IIS7.  But since some pages are showing up correctly, I'm think that it isn't an issue of not having the right DLLs or web.config setup for routing to be activated.

I want to emphasize also that when running from the development computer itself, through Visual Studio, this all works perfectly.

I figure that there must be some setting somewhere that must be enabled to get these API-type methods to work on IIS7.  But I'm having trouble finding any information about this.

Thanks!
NewbisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan McFaddenSystems EngineerCommented:
Can you post the 404 errors from the http logs?

Have you checked the DLL dependencies of the controller?  

Dan
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NewbisAuthor Commented:
Gee, now I feel silly.  When I look at the log, where it's next to all the correct URLs, the error in the URL popped out at me.  Somehow, in FireBug, it looked right, because it just writes the one line, but when I saw it in the log, I realized that it's wrong.  If I hard-code the right URL, it works.  So something in my code isn't getting the base URL correctly.
0
NewbisAuthor Commented:
Looking at the server log file, it's easier to spot that the URL is wrong than just looking at a single URL from FireBug, because in the log file, it's next to all the correct URLs.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.