473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Service accessing mapped drive

I have a service which is a Windows Service, but it is running under a User
account - I enter my own credentials on installing.
It can access network files by specifying the full UNC path, i.e.
\\server\share, but it can't use mapped drive letters.
Is there anyway I can modify it so that it can?

Thanks
Nov 16 '05 #1
3 2082
In another post I told you that mapped drives are (Logon) session bound.
That means if an interactive user creates a use record (maps a drive), all
programs running in this session will have access to the mapped drive,
however, programs running in another logon session don't have access to
this/these mapped drives.

That means you need to create another use record from within your service.
But, really, I would never ever use a mapped drive, why not simply use a UNC
path?

Willy.
..
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
I have a service which is a Windows Service, but it is running under a User
account - I enter my own credentials on installing.
It can access network files by specifying the full UNC path, i.e.
\\server\share, but it can't use mapped drive letters.
Is there anyway I can modify it so that it can?

Thanks

Nov 16 '05 #2
Well, I had thought that because the service was logging on as me when it
installed (as it is a "User" account installer), it would be able to access
my mapped drives. But since as you say they're session bound, I will just use
a UNC path.

"Willy Denoyette [MVP]" wrote:
In another post I told you that mapped drives are (Logon) session bound.
That means if an interactive user creates a use record (maps a drive), all
programs running in this session will have access to the mapped drive,
however, programs running in another logon session don't have access to
this/these mapped drives.

That means you need to create another use record from within your service.
But, really, I would never ever use a mapped drive, why not simply use a UNC
path?

Willy.
..
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
I have a service which is a Windows Service, but it is running under a User
account - I enter my own credentials on installing.
It can access network files by specifying the full UNC path, i.e.
\\server\share, but it can't use mapped drive letters.
Is there anyway I can modify it so that it can?

Thanks


Nov 16 '05 #3
Each Logon Session is a separate security context, even if you use the same
credentials. Guess what would happen to your service when the interactive
user logged off effectively closing the session and as such releasing the
mapped drives.

Willy.

"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:6F**********************************@microsof t.com...
Well, I had thought that because the service was logging on as me when it
installed (as it is a "User" account installer), it would be able to
access
my mapped drives. But since as you say they're session bound, I will just
use
a UNC path.

"Willy Denoyette [MVP]" wrote:
In another post I told you that mapped drives are (Logon) session bound.
That means if an interactive user creates a use record (maps a drive),
all
programs running in this session will have access to the mapped drive,
however, programs running in another logon session don't have access to
this/these mapped drives.

That means you need to create another use record from within your
service.
But, really, I would never ever use a mapped drive, why not simply use a
UNC
path?

Willy.
..
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
>I have a service which is a Windows Service, but it is running under a
>User
> account - I enter my own credentials on installing.
> It can access network files by specifying the full UNC path, i.e.
> \\server\share, but it can't use mapped drive letters.
> Is there anyway I can modify it so that it can?
>
> Thanks


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Anthony Boudouvas | last post by:
Hi to all, is there a way to access a mapped network drive from a Windows Service application ? I created a very simple one, using a timer that checks for a file existance on G:\Emails (a...
5
by: Niloday | last post by:
Hi All, I am trying to access a mapped network drive from a service that I have created. The service needs to create/delete folders/files on a network drive. When I tried to connect to a...
1
by: Z0gS | last post by:
I got this problem for the web application I try to access files on a remote server. string dirs = Directory.GetDirectories(@"E:\vehicles") E drive is a map to a network drive. I get the...
1
by: Max Baki via .NET 247 | last post by:
I all, i've write a sample ftp Windows service which download files and copy them on remote share or remote mapped drive (the service works fine on local drives). This part of code is the...
14
by: Jasonkimberson | last post by:
Currently I am having a problem creating a windows service that monitors a mapped drive for events (using the FileSystemEventHandler). The service complies but fails to start: "The XMLWatcher...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
5
by: Marc | last post by:
I am trying to run a web service that has pre-compiled dll's that reference dll's that are on a mapped drive. The web service can not load because it does not see that mapped drive and returns an...
4
by: sajid_yusuf | last post by:
Hi I am trying to develop a Windows service in VB.NET which has timer enabled and keeps checking a folder (or group of folders) for any new file or changed files. As soon as it detects any new...
13
by: cj | last post by:
I wrote this code in a windows app and it works: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ds As New DataSet Dim...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.