Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security question on a Windows Service

Status
Not open for further replies.

KreativeKai

Programmer
Nov 12, 2004
33
US
While testing a service we've setup in Visual Studio / VB.NET we've found that the service will start without a problem if the files that it is monitoring are local to the machine the service is running on.

As soon as we try to monitor a file on our network, and start the service, the following security message is thrown:

Service cannot be started. System.UnauthorizedAccessException: Access to the path "\\TheServer\D Drive\FTP Files\OpenActions.csv" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.File.GetLastWriteTimeUtc(String path)
at System.IO.File.GetLastWriteTime(String path)
at FileChangeMonitor.ChangeMonitor.CheckFileChanged(String FileName, DateTime& LastChangeDate) in E:\_MyFiles\Vb.NetProjects\Development\FileChangeMonitor\FileChangeMonitor\ChangeMonitor.vb:line 171

Any suggestions on what needs to be changed via security is appreciated.
 
Can you access that server any other way? Are you allowed to?

__________________________________________
Try forum1391 for lively discussions
 
goto the contol panel, admin tools, .Net Wizards, trust application, follow the wizard, select the app (service) and raise the security level to full.

-Rick

----------------------
 
Thanks to both of you!!

All we had to do was the following:
Control Panel->Administive Tools->Services->Right Click on the service->Properties->LogOn->and fill in This Account information with a valid signon which had access to the folder on the server.

Thanks again for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top