Re: Windows Service UnauthorizedAccessException
- From: Greyhound <rhill938@xxxxxxxxxxx>
- Date: Mon, 7 Apr 2008 08:50:05 -0700
Thanks. My drive is using its UNC. As for the user the process is running
under, I am not sure how to answer. I run the Windows Forms app under my
logon. Do I need to do something different for the Windows Service on my
machine?
"Ignacio Machin ( .NET/ C# MVP )" wrote:
On Apr 7, 10:18 am, Greyhound <rhill...@xxxxxxxxxxx> wrote:.
I have created a Windows Service with C# in VS2008. I created the file
processing code first in a Windows Forms application that reads a flat file
on a network share. I am able to access the directory on the network and
access the files from the Windows Forms application. When I create and
deploy the Windows Service on my PC, I get an 'UnauthorizedAccessException'
exception stating that access to the specified network path is denied. The
code is the same on both applications except for the code required to make
the service run as a service. Are there special permissions required to
access a file on a network share?
Thanks...
under what user your process runs?
how are you accessing the network share? Remember that you will not
have mapped drives so you have to access them by using its UNC: \
\servername\Share\
- References:
- Windows Service UnauthorizedAccessException
- From: Greyhound
- Re: Windows Service UnauthorizedAccessException
- From: Ignacio Machin ( .NET/ C# MVP )
- Windows Service UnauthorizedAccessException
- Prev by Date: Re: Handling SPAM posts
- Next by Date: Re: Deep Clones
- Previous by thread: Re: Windows Service UnauthorizedAccessException
- Next by thread: Re: Windows Service UnauthorizedAccessException
- Index(es):
Relevant Pages
|