In short words, everything works on local machine but doesn't when deployed to server "A".
I'm sure someting is missing in server "A", but I don't know what it is, and I don't have access there to make changes or proper testing.
So I'm here to aks for help and ideas of what the problem may be so that I can advise the person in charge of server "A", or whatever changes I need to make on my project to make it work there.
That being said, lets talk about my project...
I'm using Web Api, and a route is defined in the global.asax as such:
RouteTable.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = System.Web.Http.RouteParameter.Optional });
I'm calling the controllers using Jquery ajax and Kendo UI, as such:
(this is a fake example just to prove the point)
read: {
url: function () {
return "../api/Member/123";
}
}
Again, everything works great on local server, but when I deploy it, I get for every web api call:
404 - File or directory not found.
Nothing else.
Things to consider:
- I'm compiling the project with .NET 4.0 framework.
- The website on server "A" is set up to use .NET 4.0 classic (could this be a problem?)
- I don't think MVC 4 is installed in server "A". Does Web Api requires MVC?
- Server "A" is running IIS 7
I added the following to the web.config file, but still get the 404 error:
<modules runAllManagedModulesForAllRequests="true"/>
Let me know if you need any other information.
Thanks for your help!!