So I was having a strange problem in SharePoint the other day trying to run a webservice from a client script. Every time I called the service (in this case and .asmx in the layouts dir) it was doing nothing...no communication at all with the service. What made this particularly strange is that this exact same setup was working fine for everyone else in my team...figures.
When I ran the web methods from the service page itself (which loaded just fine) I got the following error : Request format is unrecognized for URL unexpectedly ending in '/[webmethod_name]'. Didn't make sense...I checked my web configuration and compared it against the other people in my team and all was well. I tried following Microsoft's recommendation of adding the following snippet to the system.web section of the config file.
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
All the above did was give me a 500 error.
After spending waaaaaaaaay to much time on the problem...a colleague of mine and I finally discovered that it was due to the Lower case rewrite inbound rule (converts the entire address to lower case). Apparently webmethod names are case sensitive in the address bar (this was not a SharePoint problem)...the documentation is here on msdn: http://msdn.microsoft.com/en-us/library/0c515353(VS.71).aspx
So turning off the rule and everything started to work again.