简体   繁体   English

从Windows Server 2008访问Windows Server 2003共享文件夹

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

相关问题 WPF应用程序无法在Windows Server 2003/2008中工作 - WPF application not working in windows server 2003/2008 Windows Server 2003到2008 sslstream没有通用算法 - Windows Server 2003 to 2008 sslstream No Common Algorithm 在sql server 2008中从C#中选择,在Windows Server 2003中太慢了:( - Select from C# in sql server 2008 too slow in windows server 2003 :( 使用C#向Windows Server 2003/2008中的防火墙添加例外 - Adding exception to firewall in Windows Server 2003/2008 using C# windows 服务在 windows 7 上工作,但不在 windows 服务器 2003 上 - windows service working on windows 7 but not on windows server 2003 Windows Server 2003的BackgroundWorker限制 - BackgroundWorker limitation on Windows server 2003 审核Windows Server 2003文件夹 - Auditing Windows Server 2003 folders cryptacquirecontext在Windows Server 2008中引发“访问被拒绝” - cryptacquirecontext throws “Access denied” in Windows Server 2008 Windows服务无法在Windows 2003 Server中启动 - Windows service fails to start in windows 2003 server 无法从使用c#(Windows 2003服务器)编写的Windows服务访问DCOM对象,但可以在作为控制台应用程序托管时访问该对象 - Unable to access DCOM object from Windows Service written in c# (Windows 2003 server) but can access the object when hosted as a console application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM