Reputation: 55
My application works great when I deploy to my local machine, IIS 7. On Discountasp.net it will launch the application, but none of the calls to the web service work.
I get "IIS 8.0 Detailed Error - 404.0 - Not Found".
I recently upgraded my account to "Windows 2012 - IIS 8.0", and other kinds of web-service applications I have there are working great.
The application is built in Visual Studio 2012, .NET 4.5, with a Web Service : RPC style (not REST) Web Api with the apiController.
For example, some code that I'm calling with jQuery ajax:
public class ItemController : ApiController
{
[HttpPost]
public ItemsReturn PostItemsSorted(ItemsSortedRequest inputs)
{
ItemGetSortedCaller cls = new ItemGetSortedCaller();
ItemsReturn ret = cls.CallGetSortedItems(inputs);
return ret;
}
}
var inputdata = {searchWord:searchWord,
sortColumn:sortColumn
};
$.ajax({
type: "POST",
url: "/api/Item/PostItemsSorted";
contentType: 'application/json; charset=utf-8',
dataType: 'json',
data: JSON.stringify(inputData),
context: this
});
I've searched everywhere, and have no clue. Why the 404?
Upvotes: 0
Views: 322