I have deployed a web service to a ubuntu server running lighttpd and fastcgi-mono-server2. The .asmx page loads correctly but when I test the method I get a 404.
My web service is called Import.asmx and my method is called download and the 404 comes back saying import.asmx/download does not exist
Using xsp2 the same service works perfectly
I assume it is something to do with how the /download gets served by lighttpd/fastcgi but cannot work out how to fix it.
Solved the 404 error... but now I have a 500.
Actually I was getting this error on every MyService.asmx/SomeMethod post calls. The solution [NOT REALLY] I've figured it out:
I've change it from only asmx to asmx/()*. Ok no 404 but now a 500: System.Web.HttpException: Method 'POST' is not allowed when accessing file '/Services/MyService.asmx/MyMethod'.
This findings give me some clues that nginx don't handle properly this kind of requests. After googling for almost 2 hours I've found a solution:
I wasn't to far from it. Just add this location rule before the current you have and works fine.
I had the very same issue. Turned out to be default directive for serving 404 when not finding assets. Removed the following line:
And add
PATH_INFO
as fastcgi param in /etc/nginx/fastcgi_params:That fixed it for me. Hope it helps.