"Eugene V. Goldberg" <eg...@mts-nn.ru> wrote in message
news:489711f7$1...@newsgroups.borland.com...
The problem is, it cant write to network mapped drive. No errors are
registered,
it just never writes...If i run the service under Administrator account
which has all
the priviledges, it doesnt help.
Any ideas?
Thanx,
Eugene.
> I have a service which writes to a text file.
>
> The problem is, it cant write to network mapped drive. No errors are
> registered, it just never writes...If i run the service under
> Administrator account which has all the priviledges, it doesnt help.
A service runs under a user account that usually has no mapped drives
defined. Such definitions are account-specific. If your service has
network access rights (System does not have that) you can access remote
shares via UNC names or map them in code via WNetAddConnection2. You
need to do that anyway if the share requires authentication and account
used does not have direct access to it.
--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com
> The problem is, it cant write to network mapped drive. No errors are
> registered, it just never writes...
It might help if you sort out your error handling so that it does
detect the errors. What does your writing code look like?
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
> The problem is, it cant write to network mapped drive.
That problem is two-fold:
First, drive letter assignments are user-specific. The service has to
impersonate a particular user and load its Registry hive in order to access
its drive letters. Or else it has to assign its own drive letters within
its own account. Otherwise, you need to use UNC paths directly instead.
Second, services do not have any access to the network by default. The
service needs to run in a user account that has network access. Either one
of the built-in accounts, such as "NetworkService", or else use a particular
user account instead.
Gambit
"Eugene V. Goldberg" <eg...@mts-nn.ru> wrote in message
news:4897...@newsgroups.borland.com...
Regards.
"Eugene V. Goldberg" <eg...@mts-nn.ru> wrote in message
news:489711f7$1...@newsgroups.borland.com...