PC Review


Reply
Thread Tools Rate Thread

W2K3 Service w/ UNC Access, Local Disk Access, and DB Access

 
 
Rob
Guest
Posts: n/a
 
      30th Jul 2004
Hi,

I am working on a project that requires a Windows Service which
performs the following file transfer functions.

1. It monitors a specific local directory on a Windows 2003 Server.
2. When it finds files with a specific extension, it queries a SQL
Server database to determine what workstation will be the destination
of a File.Copy.
3. It copies those files to the appropriate workstations on the LAN,
using the File.Copy command.

The network does not have a domain controller. The server is a
standard Windows 2003 Server, which runs IIS and MSDE, servicing a web
application. This web application creates files in a configurable
location on the server, which have to be moved to workstations on the
network, in order to free up the space on disk.

These files are backed up from the workstations with BackupExec
nightly.

Here are my problems.

1. When I configure the Windows Service as Local System, it does not
have access to mapped drives or UNCs.
2. When I configure the Windows Service as Network Service, it does
not have access to local files. I haven't gotten far enough to
determine if it has access to SQL Server.
3. When I configure the Windows Service as a User, with a local user
account, it doesn't install, even if I configure the local user with
"logon as service" permissions.
4. I do not have a domain controller in this small office, so I cannot
configure this service with a domain user.

When I build the application as a Windows application, it works.

So what do I need to do to make a Windows Service have local disk
access, database access, and UNC access to public shares on the LAN?

Thanks.
 
Reply With Quote
 
 
 
 
nal
Guest
Posts: n/a
 
      30th Jul 2004
Run it under the context of a user that has appropriate ACLs on the file
system. This same user can be given appropriate db permissions.
"Rob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I am working on a project that requires a Windows Service which
> performs the following file transfer functions.
>
> 1. It monitors a specific local directory on a Windows 2003 Server.
> 2. When it finds files with a specific extension, it queries a SQL
> Server database to determine what workstation will be the destination
> of a File.Copy.
> 3. It copies those files to the appropriate workstations on the LAN,
> using the File.Copy command.
>
> The network does not have a domain controller. The server is a
> standard Windows 2003 Server, which runs IIS and MSDE, servicing a web
> application. This web application creates files in a configurable
> location on the server, which have to be moved to workstations on the
> network, in order to free up the space on disk.
>
> These files are backed up from the workstations with BackupExec
> nightly.
>
> Here are my problems.
>
> 1. When I configure the Windows Service as Local System, it does not
> have access to mapped drives or UNCs.
> 2. When I configure the Windows Service as Network Service, it does
> not have access to local files. I haven't gotten far enough to
> determine if it has access to SQL Server.
> 3. When I configure the Windows Service as a User, with a local user
> account, it doesn't install, even if I configure the local user with
> "logon as service" permissions.
> 4. I do not have a domain controller in this small office, so I cannot
> configure this service with a domain user.
>
> When I build the application as a Windows application, it works.
>
> So what do I need to do to make a Windows Service have local disk
> access, database access, and UNC access to public shares on the LAN?
>
> Thanks.



 
Reply With Quote
 
 
 
 
Rob
Guest
Posts: n/a
 
      30th Jul 2004
"nal" <nal@invalidaddress> wrote in message news:<um#(E-Mail Removed)>...
> Run it under the context of a user that has appropriate ACLs on the file
> system. This same user can be given appropriate db permissions.
> "Rob" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> >
> > I am working on a project that requires a Windows Service which
> > performs the following file transfer functions.
> >
> > 1. It monitors a specific local directory on a Windows 2003 Server.
> > 2. When it finds files with a specific extension, it queries a SQL
> > Server database to determine what workstation will be the destination
> > of a File.Copy.
> > 3. It copies those files to the appropriate workstations on the LAN,
> > using the File.Copy command.
> >
> > The network does not have a domain controller. The server is a
> > standard Windows 2003 Server, which runs IIS and MSDE, servicing a web
> > application. This web application creates files in a configurable
> > location on the server, which have to be moved to workstations on the
> > network, in order to free up the space on disk.
> >
> > These files are backed up from the workstations with BackupExec
> > nightly.
> >
> > Here are my problems.
> >
> > 1. When I configure the Windows Service as Local System, it does not
> > have access to mapped drives or UNCs.
> > 2. When I configure the Windows Service as Network Service, it does
> > not have access to local files. I haven't gotten far enough to
> > determine if it has access to SQL Server.
> > 3. When I configure the Windows Service as a User, with a local user
> > account, it doesn't install, even if I configure the local user with
> > "logon as service" permissions.
> > 4. I do not have a domain controller in this small office, so I cannot
> > configure this service with a domain user.
> >
> > When I build the application as a Windows application, it works.
> >
> > So what do I need to do to make a Windows Service have local disk
> > access, database access, and UNC access to public shares on the LAN?
> >
> > Thanks.


Thanks for your response. I've already tried this, but the local user
setting causes the installation to fail, even when I set the "Logon as
Service" permission for the local user.
 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      30th Jul 2004
It should not fail, how did you specify your local account?
Willy.

"Rob" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "nal" <nal@invalidaddress> wrote in message
> news:<um#(E-Mail Removed)>...
>> Run it under the context of a user that has appropriate ACLs on the file
>> system. This same user can be given appropriate db permissions.
>> "Rob" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi,
>> >
>> > I am working on a project that requires a Windows Service which
>> > performs the following file transfer functions.
>> >
>> > 1. It monitors a specific local directory on a Windows 2003 Server.
>> > 2. When it finds files with a specific extension, it queries a SQL
>> > Server database to determine what workstation will be the destination
>> > of a File.Copy.
>> > 3. It copies those files to the appropriate workstations on the LAN,
>> > using the File.Copy command.
>> >
>> > The network does not have a domain controller. The server is a
>> > standard Windows 2003 Server, which runs IIS and MSDE, servicing a web
>> > application. This web application creates files in a configurable
>> > location on the server, which have to be moved to workstations on the
>> > network, in order to free up the space on disk.
>> >
>> > These files are backed up from the workstations with BackupExec
>> > nightly.
>> >
>> > Here are my problems.
>> >
>> > 1. When I configure the Windows Service as Local System, it does not
>> > have access to mapped drives or UNCs.
>> > 2. When I configure the Windows Service as Network Service, it does
>> > not have access to local files. I haven't gotten far enough to
>> > determine if it has access to SQL Server.
>> > 3. When I configure the Windows Service as a User, with a local user
>> > account, it doesn't install, even if I configure the local user with
>> > "logon as service" permissions.
>> > 4. I do not have a domain controller in this small office, so I cannot
>> > configure this service with a domain user.
>> >
>> > When I build the application as a Windows application, it works.
>> >
>> > So what do I need to do to make a Windows Service have local disk
>> > access, database access, and UNC access to public shares on the LAN?
>> >
>> > Thanks.

>
> Thanks for your response. I've already tried this, but the local user
> setting causes the installation to fail, even when I set the "Logon as
> Service" permission for the local user.



 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      1st Aug 2004
"Willy Denoyette [MVP]" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> It should not fail, how did you specify your local account?
> Willy.
>
> "Rob" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "nal" <nal@invalidaddress> wrote in message
> > news:<um#(E-Mail Removed)>...
> >> Run it under the context of a user that has appropriate ACLs on the file
> >> system. This same user can be given appropriate db permissions.
> >> "Rob" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > Hi,
> >> >
> >> > I am working on a project that requires a Windows Service which
> >> > performs the following file transfer functions.
> >> >
> >> > 1. It monitors a specific local directory on a Windows 2003 Server.
> >> > 2. When it finds files with a specific extension, it queries a SQL
> >> > Server database to determine what workstation will be the destination
> >> > of a File.Copy.
> >> > 3. It copies those files to the appropriate workstations on the LAN,
> >> > using the File.Copy command.
> >> >
> >> > The network does not have a domain controller. The server is a
> >> > standard Windows 2003 Server, which runs IIS and MSDE, servicing a web
> >> > application. This web application creates files in a configurable
> >> > location on the server, which have to be moved to workstations on the
> >> > network, in order to free up the space on disk.
> >> >
> >> > These files are backed up from the workstations with BackupExec
> >> > nightly.
> >> >
> >> > Here are my problems.
> >> >
> >> > 1. When I configure the Windows Service as Local System, it does not
> >> > have access to mapped drives or UNCs.
> >> > 2. When I configure the Windows Service as Network Service, it does
> >> > not have access to local files. I haven't gotten far enough to
> >> > determine if it has access to SQL Server.
> >> > 3. When I configure the Windows Service as a User, with a local user
> >> > account, it doesn't install, even if I configure the local user with
> >> > "logon as service" permissions.
> >> > 4. I do not have a domain controller in this small office, so I cannot
> >> > configure this service with a domain user.
> >> >
> >> > When I build the application as a Windows application, it works.
> >> >
> >> > So what do I need to do to make a Windows Service have local disk
> >> > access, database access, and UNC access to public shares on the LAN?
> >> >
> >> > Thanks.

> >
> > Thanks for your response. I've already tried this, but the local user
> > setting causes the installation to fail, even when I set the "Logon as
> > Service" permission for the local user.


I go to Computer Management/Local Users and Groups. I create a Local
User. I assigned the user to the Administrators group. Then I go to
Local Security Policy, and assign that user the "Logon as Service"
permission.

Then I build the windows service with User access specified, and I put
the user's account name and password in the code. Then I rebuild the
deployment application. I've tried putting the user's name in the code
in the following ways to no avail.

username password
computer\\username password
..\\username password

When I run it, I get the user permissions error, and the installation
fails.

The network on which I'm testing has a domain controller. However, I
cannot rely on this because the network where the application will be
installed has no controller.

Thanks again for your responses.
 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      1st Aug 2004

> computer\\username password


Is the correct format for the ServiceProcessInstaller.Username property.

When exactly do you get the error, when running the installutil or when
starting the service?

Willy.



 
Reply With Quote
 
Rob
Guest
Posts: n/a
 
      2nd Aug 2004
"Willy Denoyette [MVP]" <(E-Mail Removed)> wrote in message news:<#(E-Mail Removed)>...
> > computer\\username password

>
> Is the correct format for the ServiceProcessInstaller.Username property.
>
> When exactly do you get the error, when running the installutil or when
> starting the service?
>
> Willy.


I see the problem. I was putting the username in the password property
and vice versa. For some reason, I assumed that the Username would be
first.

Thanks for your assistance.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving W2K3 TS CAL from W2K to a W2K3 server =?Utf-8?B?THVpcyBFLg==?= Microsoft Windows 2000 Terminal Server Applications 1 10th Jun 2005 11:00 AM
Migration to W2K3 + Exchange W2K3 =?Utf-8?B?SmFjaw==?= Microsoft Windows 2000 Upgrade 0 18th Nov 2003 09:36 PM
valid syntax for copy from unc to unc LarryG Microsoft Windows 2000 CMD Promt 3 3rd Nov 2003 09:47 PM
UNC File copy MUCH FASTER than mapped UNC drive copy? NTNEWS Microsoft Windows 2000 0 17th Sep 2003 07:01 AM
UNC File copy MUCH FASTER than mapped UNC drive copy? NTNEWS Microsoft Windows 2000 File System 0 17th Sep 2003 07:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:36 AM.