Re: Windows service Unable to access mapped drives on XP and 2003 by Willy
Willy
Mon Jun 06 12:18:29 CDT 2005
Well that explain it all.
Share mappings are login session bound, that means that if you map a shared
drive in a Logon session of an interactive user, this mapped drive will not
be usable from within another Logon session (your service login session)
EVEN if the service account is the SAME as the interactive Logon. One
possible solution is to map the drive from within the service (using
PInvoke). Another option is to run the service using a local account that
has a shadow on the remote server (that is an account with the same name and
password on both servers). And the third is to use UNC paths, you remark
about "the client wants... "is not really valid, what the client wants is a
backup right?
Willy.
"MVB" <MVB@discussions.microsoft.com> wrote in message
news:EE5FF0C1-4281-4F1C-8701-7FF68528D948@microsoft.com...
> The mapping is not done from within the service.I have mapped the drives
> using windows Explorer "Map Network Drives".
>
> Thanks
>
>
> "Willy Denoyette [MVP]" wrote:
>
>>
>> "MVB" <MVB@discussions.microsoft.com> wrote in message
>> news:0ED2551D-AE3E-49B2-BBD1-6BAA8839B339@microsoft.com...
>> > But My service is not running on the LocalSystem.It runs under a user
>> > account
>> > with the Domain\Administrator credentials.And the mapped drives can be
>> > accessed on a windows 2000 box using the same service.But has problems
>> > with
>> > XP and 2003.
>> > Is this information sufficient?
>> >
>> > Thanks
>> >
>>
>>
>> How exactly did you "mapped the drive", was the mapping done from within
>> the service code, or by any other means?
>>
>> Willy.
>>
>> Note: You should never use mapped drives, use UNC paths instead.
>>
>>
>>