3

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. Both these servers are from the same providers, and belong to the same network. A shared folder exists on the WS2003 server.

From the Windows Service i am trying to access the shared folder using UNC Path (\Server2003IP\SMSFiles), where it gives error.

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. 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.

Any Helping Hands Please

dsolimano
  • 8,870
  • 3
  • 48
  • 63
HishHash
  • 157
  • 1
  • 2
  • 11

1 Answers1

2

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.

:-)

HishHash
  • 157
  • 1
  • 2
  • 11