[英]Access windows server 2003 share folder from windows server 2008
I am creating a windows service application to run on a Windows Server 2008. Another windows server 2003 server running on a different live IP exists. 我正在创建一个在Windows Server 2008上运行的Windows服务应用程序。另一个在不同的实时IP上运行的Windows Server 2003服务器存在。 Both these servers are from the same providers, and belong to the same network.
这两个服务器都来自相同的提供商,属于同一个网络。 A shared folder exists on the WS2003 server.
WS2003服务器上存在共享文件夹。
From the Windows Service i am trying to access the shared folder using UNC Path (\\Server2003IP\\SMSFiles), where it gives error. 从Windows服务我尝试使用UNC路径(\\ Server2003IP \\ SMSFiles)访问共享文件夹,它提供错误。
if (!System.IO.Directory.Exists(PATH_SMS))
throw new ApplicationException("Could not find or access SMS folder");
The Windows service is installed & I tried giving the Logon as the System Administrator also. 安装了Windows服务,我也尝试以系统管理员身份登录。 But no luck.
但没有运气。
FYI - The same scenario by keeping the shared folder on WS 2008 & installed the service on WS 2003 and the whole thing worked fine. 仅供参考 - 通过在WS 2008上保留共享文件夹并在WS 2003上安装该服务来实现相同的方案,整个工作正常。
Any Helping Hands Please 任何帮助请
After searching online and testing various scenarios, i was able to fix the issue. 在线搜索并测试各种场景后,我能够解决问题。
Solution: Both the servers should have a user with the same Username & Password and give permissions for the folders. 解决方案:两台服务器都应该拥有一个具有相同用户名和密码的用户,并为这些文件夹授予权限。 Also run the windows service under this particular Login User.
还可以在此特定登录用户下运行Windows服务。
:-) :-)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.