I wrote a Windows service that creates a file on a local drive (folder C: \ Testing).
I installed this service. I am starting this service from a web application hosted in IIS.
If I hard-coded this path in the service code, the service works fine, but if I go through the web application to the web service, an event log showing excepetion
The service cannot be started. System.UnauthorizedAccessException: Access to path "C: \ Testing" is denied.
I have administrator access to my machine, and I'm starting the service with the same account. How can I get rid of this exception?
source share