This is puzzling me. I deployed an MVC 2 application to IIS6 and everything works fine except for my jqGrid calls to get data.
All is well on my development machine, but here are the two URLs I'm working with
Local dev web server:
POST http://localhost:port/Ctrl.mvc/JsonMethod
IIS6 (notice https - not sure if that matters)
POST https://www.domain.com/AppName/Ctrl.mvc/JsonMethod
The latter URL results in a HTTP 404, which is really confusing as all works well on my local machine. The JsonMethod
is properly declared with [AcceptVerbs(HttpVerbs.Post)]
Let me know if any more info is needed - I appreciate any and all help with this!
EDIT Quite an oversight on my part..
All of my JSON requests are /Ctrl.mvc/JsonMethod
. Well, on the IIS server, the code is in a sub-folder - AppName
. As such, I'm getting a 404 because https://domain/Ctrl.mvc/JsonMethod
is not found - which is correct.
Basically, I need to change my JSON requests when I deploy - which I really don't like, but perhaps there is a better way?