问题描述
我已将 Web 服务部署到运行 lighttpd 和 fastcgi-mono-server2 的 ubuntu 服务器..asmx 页面加载正确,但是当我测试该方法时,我得到了 404.
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.
我的网络服务称为 Import.asmx,我的方法称为下载,404 回来说 import.asmx/download 不存在
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
使用 xsp2 同样的服务也能完美运行
Using xsp2 the same service works perfectly
我认为这与/download 如何由 lighttpd/fastcgi 提供服务有关,但无法解决如何修复它.
I assume it is something to do with how the /download gets served by lighttpd/fastcgi but cannot work out how to fix it.
推荐答案
我也遇到了同样的问题.原来是在找不到资产时服务 404 的默认指令.删除了以下行:
I had the very same issue. Turned out to be default directive for serving 404 when not finding assets. Removed the following line:
try_files $uri $uri/ =404;
并在/etc/nginx/fastcgi_params 中添加 PATH_INFO
作为 fastcgi 参数:
And add PATH_INFO
as fastcgi param in /etc/nginx/fastcgi_params:
fastcgi_param PATH_INFO $fastcgi_path_info;
这为我解决了问题.希望对您有所帮助.
That fixed it for me. Hope it helps.
这篇关于使用 .asmx 使用 lighttpd 和单声道 fastcgi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!