[英]System.IO.FileNotFoundException: The system cannot find the file specified. in IIS 7 (web service project)
error in sending: System.IO.FileNotFoundException: The system cannot find the file specified.
发送错误:System.IO.FileNotFoundException:系统找不到指定的文件。
I get the exception above when I deploy my web service into IIS7, and call the web service from the browser. 将Web服务部署到IIS7中并从浏览器调用Web服务时,出现上述异常。
It works well in Visual Studio 2008, I can call the web service in client. 它在Visual Studio 2008中运行良好,我可以在客户端中调用Web服务。
I researched on Google, and found that it might be the permission issue, as in my web service I will call a COM API, which is encapsulated into a DLL. 我在Google上进行了研究,发现可能是权限问题,因为在我的Web服务中,我将调用COM API,该API封装在DLL中。
My question is why when I run it in Visual Studio, it works well but fails in IIS7? 我的问题是为什么当我在Visual Studio中运行它时,它可以正常运行,但在IIS7中失败?
And so, have you checked the permissions? 因此,您检查了权限吗?
Remember that Visual Studio is not running as the same user as IIS. 请记住,Visual Studio不是以与IIS相同的用户身份运行。 That means that if
IUSR
user does not have a permission to access a file, you will still be able to access it when running your website from Visual Studio. 这意味着,如果
IUSR
用户没有访问文件的权限,则从Visual Studio运行网站时,您仍然可以访问该文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.