unable to access share from Windows service

  • Thread starter Thread starter JerryK
  • Start date Start date
J

JerryK

Hi,

I have a VB.net windows service that loks up when I attempt to access a
share. The code work fine if I run it in the development environment. The
code is as follows:

Dim sharename as string = \\server\folder\sfolder1

if (not system.Io.directory.exists(sharename)) then
System.io.directory.CreateDirectory(sharename)
end if

I suspect this is a security issue, but I am running the service under my
account and I can execute this code. I can also perform the operations in a
DOS box.

Thanks,

jerry
 
JerryK said:
Hi,

I have a VB.net windows service that loks up when I attempt to access a
share. The code work fine if I run it in the development environment. The
code is as follows:

Dim sharename as string = \\server\folder\sfolder1

if (not system.Io.directory.exists(sharename)) then
System.io.directory.CreateDirectory(sharename)
end if

I suspect this is a security issue, but I am running the service under my
account and I can execute this code. I can also perform the operations in a
DOS box.

Thanks,

jerry

This is becaus you are not running under a user account. You can have
the service use a different account, but then you can't allow desktop
interaction.

Schneider
 
Back
Top