I have a windows service installed to copy files from a local directory to a samba share.
The service connects through the UNC path to the server (i.e. \ remoteserver \ shareddir).
I registered as the user the service is running under and was able to copy files and create files on the samba share using the UNC path.
However, when I start the service, I get io exceptions that offer a login error. I started the process monitor in this field, watching the service, and I see how it finds the UNC path, but receives a login error when trying to write to the shared resource.
This uses the simple vanilla .net System.IO.File.Copy code.
I do not understand the error, because when I log in as the same user, I can copy and create files on a shared resource.
Any ideas?
Edit: exception text
Error in the main processing loop (DoWork ()): Login error: unknown username or invalid password.
System.Exception error: MyService.ProcessExportTransferfileDirectories error and values: D: \ Export, \ RemoteServer \ intray, D: \ Export \ Archive ---> System.IO.IOException: Login failed: Unknown username or invalid password.
System.IO.__ Error.WinIOError(Int32 errorCode, String maybeFullPath) System.IO.__ .WinIOError() System.IO.File.Move(String sourceFileName, String destFileName)
MyService.Consumer.BusinessLogic.WmsFacade.MoveAndArchiveFile(String sourceFolder, String targetFolder, String archiveFolder, String rootFolder, LogCategory logCategory, LogCounter logCounter) --- MyService.Consumer.BusinessLogic.WmsFacade.MoveAndArchiveFile(String sourceFolder, String targetFolder, String archiveFolder, String rootFolder, LogCategory logCategory, LogCounter logCounter) MyService.Consumer.BusinessLogic.WmsFacade.ProcessExportTransfer(IDictionary`2 fileDirectories) MyService.Core.TimedWorkerProvider.DoWork()