I have code which works on the dev environment (my machine),
though doesn’t work on IIS6
I have a method in an ASPX page which has a footprint similar to this:
[WebMethod()]
[ScriptMethod()]
public static string HelloWorld(string name)
{
return 'Hi '+name;
}
When I look at the console on the browser, I can see my script call this method, though IIS returns a 404 not found.
The script does a http POST to this url:
http://mydomain.com/myPage.aspx/HelloWorld
I am guessing it has something to do with mime types on IIS?
Found the solution to this,
The problem was caused by two things.
Firstly, I needed to add this to the Web.Config
Then , the other issue was the use of a tool for url rewriting called UrlRewritingNet
(http://www.urlrewriting.net/149/en/home.html)
One of the ways to configure this module, is to put in in IIS6 as an ISAPI filter , matching a wild card * , so if no file extension was matched, this filter would run the query.
The way I got around the second problem was to do an XML query to my service, and not a json one. Which then uses a url with a file extension when making the call.
Hope this helps