ASP .NET Web服务错误:文件未找到

ASP .NET Web服务错误:文件未找到

问题描述:

我有一个ASP .NET Web服务,我得到“文件未找到”错误。ASP .NET Web服务错误:文件未找到

我应该可以通过访问它:

http://www.example.com/_vti_bin/AjaxUtilsWebService.asmx 

但我重定向到这个页面:

enter image description here

我可以访问_vti_bin /路径中的任何其他文件,但这个。

这里是我在AjaxUtilsWebService.asmx文件中的代码:

<%@ WebService Language="C#" Class="MyNameSpace.AjaxUtilsWebService.AjaxUtilsWebService, MyNameSpace.AjaxUtilsWebService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d6c7fad93f418837" %> 

这是我的IIS管理器中的样子: enter image description here

我可以把任何文件在那里,我能通过浏览器访问它,但不是这个。另外,我可以访问同一路径中的其他asmx文件。

任何想法?

文件权限设置为“Everyone”。

谢谢!

+0

您确定您正在访问的页面未遇到任何异常吗?调试过代码了吗? –

我刚才发现了这个问题:当我构建并部署了wsp时,它显然没有为服务运行的项目部署dll。只需复制生成的。 dll/bin/debug文件夹到C:\Windows\assembly并重新启动IIS解决了该问题。