473,574 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Rob
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.
Nov 16 '05 #1
6 2918
nal
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" <rm*******@yaho o.com> wrote in message
news:2d******** *************** ***@posting.goo gle.com...
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.

Nov 16 '05 #2
Rob
"nal" <nal@invalidadd ress> wrote in message news:<um******* *******@TK2MSFT NGP09.phx.gbl>. ..
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" <rm*******@yaho o.com> wrote in message
news:2d******** *************** ***@posting.goo gle.com...
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.
Nov 16 '05 #3
It should not fail, how did you specify your local account?
Willy.

"Rob" <rm*******@yaho o.com> wrote in message
news:2d******** *************** ***@posting.goo gle.com...
"nal" <nal@invalidadd ress> wrote in message
news:<um******* *******@TK2MSFT NGP09.phx.gbl>. ..
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" <rm*******@yaho o.com> wrote in message
news:2d******** *************** ***@posting.goo gle.com...
> 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.

Nov 16 '05 #4
Rob
"Willy Denoyette [MVP]" <wi************ *@pandora.be> wrote in message news:<OQ******* *******@tk2msft ngp13.phx.gbl>. ..
It should not fail, how did you specify your local account?
Willy.

"Rob" <rm*******@yaho o.com> wrote in message
news:2d******** *************** ***@posting.goo gle.com...
"nal" <nal@invalidadd ress> wrote in message
news:<um******* *******@TK2MSFT NGP09.phx.gbl>. ..
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" <rm*******@yaho o.com> wrote in message
news:2d******** *************** ***@posting.goo gle.com...
> 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\\usern ame 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.
Nov 16 '05 #5
computer\\usern ame password


Is the correct format for the ServiceProcessI nstaller.Userna me property.

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

Willy.

Nov 16 '05 #6
Rob
"Willy Denoyette [MVP]" <wi************ *@pandora.be> wrote in message news:<#H******* *******@TK2MSFT NGP12.phx.gbl>. ..
computer\\usern ame password


Is the correct format for the ServiceProcessI nstaller.Userna me 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.
Nov 16 '05 #7

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

Similar topics

2
1611
by: WohooWahoo | last post by:
I just finished writing an app for an ASP.NET website which uses SQL, C# ASP.NET and web services on my development box. Ported the app over to the Web Server (running W2K3, IIS 6, SQL2K), created the website on IIS, setup the appropriate SQL db, and loaded VS.NET 2K3 to compile the app. However, the app will not compile due to ASPNET and...
3
3839
by: Bernd Giegerich | last post by:
Hi, we had a strange problem with DB2 8.2 Enterprise Edition on Windows 2003 (Standard) Server. We installed DB2 8.2 (8.1.7) directly on a naked W2K3 system (no migration, no update -> no leftovers from an older version on the system). After that, we had to change the IP address of the system. Same
1
1162
by: WohooWahoo | last post by:
I just finished writing an app for an ASP.NET website which uses SQL, C# ASP.NET and web services on my development box. Ported the app over to the Web Server (running W2K3, IIS 6, SQL2K), created the website on IIS, setup the appropriate SQL db, and loaded VS.NET 2K3 to compile the app. However, the app will not compile due to ASPNET and...
8
1580
by: John | last post by:
Hi I need to be able to call a web service method, receive the dataset that web method returns and store it in an access table. My problem is that I don't know how to "receive" a complex type like a dataset and how to link it to the access table that it is supposed to go in. Could someone please give me a code example? Thanks
4
1293
by: Nijazi Halimaji | last post by:
Hi newsgroup I have some problems with my service which is using ODBC-Connections. My service is executed as a local system (I tried already every other account type, even the domain-admin) If the database i am accessing with odbc is stored on my local hard disk, then I have no problems.
0
1596
by: =?Utf-8?B?RGF2aWQ=?= | last post by:
I use a web service to download files over the net. This works fine when the files are located on the web services local hard disk. However, it fails when the files are located on a shared network drive. It is my understanding that the web service process is 'owned' by local\ASPNET (XP Pro), and I guess this user does not have access to our...
1
1904
by: ringoschplingo | last post by:
Hi, (sorry this is a long one) I have MSSQL 2000 (version 8.00.2187) installed on Windows Server 2K3, nothing 'special' has been done to either of these servers as far as configuration goes. The exact details of the Windows server are Version - 5.2.3790, SP1. In order to query an Oracle db from SQL, I've set up a linked server within SQL...
6
1992
by: =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post by:
Hi - I have 4 webservers in my webfarm. All Win2k3 web edition. Before yesterday, none of them were service packed. I have now applied SP2 to two of them, and I'm getting a very weird MSDTC error on them now. The error occurs when I attempt a series of SQL statements wrapped in a TransactionScope(). It's executing against a different...
0
7813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7736
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...
0
8066
Oralloy
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. ...
1
7826
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8106
tracyyun
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...
1
5631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5305
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...
1
2251
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
0
1066
bsmnconsultancy
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...

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.