简体   繁体   English

System.IO.FileNotFoundException:系统找不到指定的文件。 在IIS 7中(Web服务项目)

[英]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.

相关问题 System.IO.FileNotFoundException: '系统找不到指定的文件(使用 SetWallpaperAsync) - System.IO.FileNotFoundException: 'The system cannot find the file specified (with SetWallpaperAsync) VSTO错误System.IO.FileNotFoundException:系统找不到指定的文件。 (来自HRESULT的异常:0x80070002) - VSTO Error System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) System.IO.FileNotFoundException:无法找到上载的文件 - System.IO.FileNotFoundException : Cannot able to find the uploaded file System.IO.FileNotFoundException:找不到文件 - System.IO.FileNotFoundException : Could not find file System.IO.FileNotFoundException - 系统找不到指定的路径? - System.IO.FileNotFoundException - the system could not find the path specified? System.IO.FileNotFoundException:无法加载文件或程序集。 系统找不到文件SharpSvn.dll - System.IO.FileNotFoundException: Could not load file or assembly. The system cannot find the file SharpSvn.dll 服务无法启动。 System.IO.FileNotFoundException - Service cannot be started. System.IO.FileNotFoundException NamedPipeClientStream.Connect()抛出System.IO.FileNotFoundException:无法找到指定的文件 - NamedPipeClientStream.Connect() throws System.IO.FileNotFoundException: Unable to find the specified file System.IO.FileNotFoundException: '找不到文件'C:\Program Files (x86)\IIS Express\files'。 - System.IO.FileNotFoundException: 'Could not find file 'C:\Program Files (x86)\IIS Express\files'.' 'System.IO.FileNotFoundException' - 'System.IO.FileNotFoundException'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM