473,671 Members | 2,206 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Service won't start as a non-Power User account

I posted this to microsoft.publi c.dotnet.genera l then I saw posts about
services on this newsgroup. So, sorry for the independent cross-posting.

This might not be the best place to post this, but it looked the best from
what I saw.

I have a .NET service that is installed on an XP SP 2 machine by a user with
admin privileges. The setup asks the user for a domain account to use run
the service as. If the domain account the user provides is not at least a
Power User on the machine, the service will not start. Is this a Windows
policy?

The error I get is "Error 1053: The service did not respond to the start or
control request in a timely fashion." It is not that the service times out.
It just doesn't run. Even adding the domain user to the local machine's "Log
on as a service" Users Rights didn't help.

I put some trace statements in the services constructor, and they only get
written to a log file if the domain user is at least in the Power Users
group. So that tells me that the service isn't even being started when the
user is not a PU or Admin.

Tim

Nov 17 '05 #1
6 2806
Tim,

Well, what does your service do? It's possible that whatever it is, the
user that the service runs under doesn't have rights to do it. This in turn
causes an exception, and your service doesn't start.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Tim Werth" <ti****@newsgro ups.nospam> wrote in message
news:F7******** *************** ***********@mic rosoft.com...
I posted this to microsoft.publi c.dotnet.genera l then I saw posts about
services on this newsgroup. So, sorry for the independent cross-posting.

This might not be the best place to post this, but it looked the best from
what I saw.

I have a .NET service that is installed on an XP SP 2 machine by a user
with
admin privileges. The setup asks the user for a domain account to use run
the service as. If the domain account the user provides is not at least a
Power User on the machine, the service will not start. Is this a Windows
policy?

The error I get is "Error 1053: The service did not respond to the start
or
control request in a timely fashion." It is not that the service times
out.
It just doesn't run. Even adding the domain user to the local machine's
"Log
on as a service" Users Rights didn't help.

I put some trace statements in the services constructor, and they only get
written to a log file if the domain user is at least in the Power Users
group. So that tells me that the service isn't even being started when
the
user is not a PU or Admin.

Tim

Nov 17 '05 #2
Hi Tim,
Welcome to MSDN Newsgroup!

I have the same opinion with Nicholas . If your service requires specific
permission to complete some tasks(for example: access registry, connect to
network and so on),then the service needs to run under the account that has
relevant privilege. So in this scenario, I suggest you confirm what
privileges your service needs.

I hope the above information is useful for you. If you have any questions
or concerns, please feel free to let me know. :)

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 17 '05 #3
Thanks Nicholas and Terry for the replies.

My service uses remoting to communicate with another service on another
machine and it accesses files on shares. In its constructor, it creates its
own event log if it doesn't exist and it messes with the registry. Ok, ok.
So I am doing all kinds of admin stuff - I will move that code to the setup
because the setup requires admin privileges.

However, I still don't see why my service's constructor isn't even called
unless its user account is at least a PU. Since I put trace statements as
the first thing in the constructor, I at least expected to see them written
to the log file before any privilege-offending code was executed no matter
what user account I used. I don't think the .NET framework "examines" my
service for possible privilege violations before it even decides to create
it. That's why I am thinking it is a local policy issue.

Tim
Nov 17 '05 #4

"Tim Werth" <ti****@newsgro ups.nospam> wrote in message
news:F2******** *************** ***********@mic rosoft.com...
Thanks Nicholas and Terry for the replies.

My service uses remoting to communicate with another service on another
machine and it accesses files on shares. In its constructor, it creates
its
own event log if it doesn't exist and it messes with the registry. Ok,
ok.
So I am doing all kinds of admin stuff - I will move that code to the
setup
because the setup requires admin privileges.

However, I still don't see why my service's constructor isn't even called
unless its user account is at least a PU. Since I put trace statements as
the first thing in the constructor, I at least expected to see them
written
to the log file before any privilege-offending code was executed no matter
what user account I used. I don't think the .NET framework "examines" my
service for possible privilege violations before it even decides to create
it. That's why I am thinking it is a local policy issue.

Tim


Are you sure the non PU user has appropriate privileges to write to the log
file (whatever that may be)?

Willy.
Nov 17 '05 #5
That's it! Thanks, Willy! When I logged into the computer as the < PU user,
he couldn't write to folder where I was writing the log file. So, the
combination of the two problems - 1) file permissions and 2) doing admin
calls as a user without admin privileges - made it look like the service was
not starting up at all.

I'll move my admin calls to the setup and write the log to a place where
everyone can write to and that should fix me up.

Thanks a lot guys,
Tim
Nov 17 '05 #6
Hi Tim,

Thanks very much for the update. I am glad to know that the problem is
resolved now.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Nov 17 '05 #7

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

Similar topics

1
1614
by: Ray Stevens | last post by:
We have a remoting service that runs fine on local development machines, but throws the following error when attempting to start it on a Windows 2003 server: "Error 1053: The service did not respond to the start or control request in a timely fashion" This error occurs in a fraction of a second. Does anyone know what might be causing it?
2
5283
by: 0to60 | last post by:
I have a windows service that when started creates two threads: one thread that runs a TcpListener waiting for TcpClients to connect, and another thread that reads from the resulting sockets. My stop code .Abort()s the threads and .Stop()s the listener. One one of my computers, the service runs like, well...a service. It starts and stops nicely. On a different computer (eventually this service will be running on 50+ machines) the...
0
2093
by: LarryH | last post by:
Hi all, I going thru the MCSD course and I am creating a Windows Service. The Service compiles with no errors and I can install it using "Installutil" with no problem. But when I go into Services and try to start it I get the following error message. "Could not start the RemoteAccessAgent service on Local Computer. Error 193: 0xc1" Does anyone know what this is and how to fix this? Thanks in advance for your reply.
1
4345
by: Suman | last post by:
We are facing a problem with a Service we developed. It does not start after a re-boot. We can Start/Stop the service from the interfacing Application and the Services Control Panel all day long. But it does not start after a reboot. Details We have implemented the Service using CAtlServiceModuleT (ATL 7.0). For initialization and un-initialization, we have overridden the PreMessageLoop and the PostMessageLoop. In the initialization...
29
3399
by: Ken Allen | last post by:
I have a number of services developed in C# (.Net), and they have been working fine for the most part. Recently someone reported that ipon occassion (originally rarely, but more frequently on some systems of late), there is an entry in the Event Log immediately after a boot indicating that the service failed to start after 30,000 milliseconds. Usually it starts fine when attempting manually after the boot. I instrumented the code to...
5
1626
by: Doug Kent | last post by:
Hi, I am using a STA thread to run a COM object. On a couple of machines the thread runs fine. On another machine the thread won't start, and no exceptions are thrown. This code is running in a web service implemented using C#, ASP.NET 1.1, IIS 5.1, Windows 2000 Server.
2
5172
by: loretta.stokes | last post by:
I was wondering if anyone else has experienced this problem. On certain machines we get the standard error when starting the service manually (or on reboot): "Error 1503: The service did not respond to the start or control request in a timely fashion" and "Timeout(3000 milliseconds) waiting for the <MyServiceNameto connect" I added code to the constructor of the service to write a message to
2
3639
by: Andre Ma | last post by:
Hi there, I tried to install MS SQL Server 2000 on my desktop computer after uninstalling a version 7 instance. Everything worked fine. Using Enterprise Manager I can manage databases and the database enginge itself. My problem is now, that ISQLW.exe, i.e Query Analayzer won't start. The taskmanager shows a process isqlw.exe but nothing happens. MSSQL Log files give no hints, neither does the Windows 2000 event log.
0
1876
by: fbutler | last post by:
Greetings all, Had an existing single domain Win2k server that was demoted when a Win2k3SBS server was introduced. Upon rejoining the domain as a member server, we find that the DB2 services won't start. We get a myriad of errors: DB2 UDB SQL1042C An unexpected system error has occurred App log reveals:
4
9689
by: =?Utf-8?B?am1hZ2FyYW0=?= | last post by:
I've written a .net Windows service in C#. It works most of the time for most people. It is configured to automatically start when Windows boots. Sometimes it fails to start on Windows XP during boot. All I know is that it is timing out. But no useful details appear in the event log, not even my first EventLog message in OnStart. How can I figure out why it isn't starting? How can I fix this? My ServiceBase constructor just sets a few...
0
8390
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8909
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8667
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5690
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4221
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1801
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.