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 3 2099
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**@discussio ns.microsoft.co m> wrote in message
news:89******** *************** ***********@mic rosoft.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
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**@discussio ns.microsoft.co m> wrote in message news:89******** *************** ***********@mic rosoft.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
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**@discussio ns.microsoft.co m> wrote in message
news:6F******** *************** ***********@mic rosoft.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**@discussio ns.microsoft.co m> wrote in message news:89******** *************** ***********@mic rosoft.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 Novell server mapped drive)
I created the Service with "LocalSystem" for the ServiceProcess.Account
and it cannot find the G:\ drive.
|
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 folder on mapped network drive (eg. N:\Storage that
corresponds to \\FS1NS\SharedDir\), I get an error as "Could not find part
of path N:\".
|
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 DirectoryNotFoundException. How do I solve the problem or the is another way to write the code
Thank yo
|
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 function to change the local path for downloaded files.
If the configured path is different from local drive C: the new path is selected.
The program...
|
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 service on Local Computer started and then stopped.
Some services stop automatically if they have no work to do, for
example, the Preformance Logs and...
| |
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 seperate files server.
we have mapped the fodler to a different folder and need to allow the EXE to
process on the mapped drive. When I trigger the EXE via...
|
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 error of "Can not file
specified module". Mapped drive is added to path.
Thanks,
Marc
|
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 file or changes
(to files or folders) then it copies the files (and any new folders) to
a folder in the mapped network drive.
So far I have been...
|
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 myDbConnection As New OdbcConnection("Driver={Microsoft
Visual FoxPro Driver};" & _
"SourceType=DBF;" & _
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |