By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,899 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,899 IT Pros & Developers. It's quick & easy.

Cannot start Service on a server configured as a member of a workgroup

P: n/a
We created a Windows Service with C#. The service will start OK on
computers that are a member of a domain, but when we try to start it on a
server that is configured for a workgroup we get the following error in the
event log:

Event ID: 7001
Description: The {Service Name}service depends on the Net Logon service
which failed to start because of the following error:
The service has returned a service-specific error code.

When checking the Net Logon service, we noticed that it did not start
because of the following error in the event log:

Event ID: 3095
Description: This Windows NT computer is configured as a member of a
workgroup, not as a member of a domain. The Netlogon service does not need
to run in this configuration.

Does this mean we can't run .NET Services on any box that is not a member of
a domain?.. I sure hope not!..

Please, please, please someone give me a fix for this.

Thanks,
Bryan
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Bryan,

Without knowing more about your service and how it is setup, I don't have a
fix for the situation. I can tell you, however, that a computer running as
a member of a workgroup can indeed run .NET Windows services. We have built
many at my company.

Please send details concerning your service.
--
Jeffrey Wynn
so********@nospam.net
"Bryan" <br*********@hotmailX.comX> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
We created a Windows Service with C#. The service will start OK on
computers that are a member of a domain, but when we try to start it on a
server that is configured for a workgroup we get the following error in the event log:

Event ID: 7001
Description: The {Service Name}service depends on the Net Logon service
which failed to start because of the following error:
The service has returned a service-specific error code.

When checking the Net Logon service, we noticed that it did not start
because of the following error in the event log:

Event ID: 3095
Description: This Windows NT computer is configured as a member of a
workgroup, not as a member of a domain. The Netlogon service does not need to run in this configuration.

Does this mean we can't run .NET Services on any box that is not a member of a domain?.. I sure hope not!..

Please, please, please someone give me a fix for this.

Thanks,
Bryan

Nov 15 '05 #2

P: n/a
Well, to eliminate anything stupid we might be doing, we created an empty
service. From "New Project", I selected "Visual C# Projects" and chose
"Windows Service". After the wizard created the service I just added a
"Project Installer" and compiled it. When I tried to run it on the box that
is not a member of the domain, we got the exact same error.

Is there anything you can suggest?..

Thanks for any help!
Bryan

"Jeffrey Wynn" <so********@optonline.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Bryan,

Without knowing more about your service and how it is setup, I don't have a fix for the situation. I can tell you, however, that a computer running as a member of a workgroup can indeed run .NET Windows services. We have built many at my company.

Please send details concerning your service.
--
Jeffrey Wynn
so********@nospam.net
"Bryan" <br*********@hotmailX.comX> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
We created a Windows Service with C#. The service will start OK on
computers that are a member of a domain, but when we try to start it on a server that is configured for a workgroup we get the following error in the
event log:

Event ID: 7001
Description: The {Service Name}service depends on the Net Logon service
which failed to start because of the following error:
The service has returned a service-specific error code.

When checking the Net Logon service, we noticed that it did not start
because of the following error in the event log:

Event ID: 3095
Description: This Windows NT computer is configured as a member of a
workgroup, not as a member of a domain. The Netlogon service does not

need
to run in this configuration.

Does this mean we can't run .NET Services on any box that is not a

member of
a domain?.. I sure hope not!..

Please, please, please someone give me a fix for this.

Thanks,
Bryan


Nov 15 '05 #3

P: n/a
Ok, here is the deal... It will work if you set the
serviceProcessInstaller's account set to "LocalSystem". If you have it set
to user, the service will install, but it cannot be started. We are
suspecting that is why it is trying to use the NetLogon service.

The fix we came up with was to set the account to "User", and in the
ProjectInstaller.cs, we added the following code in the
InitializeComponent() function:

String ComputerName = "";
try
{
RegistryKey rkey =
Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentC ontrolSet\\Control\\Comput
erName\\ComputerName");
ComputerName = (String)rkey.GetValue("ComputerName", "unknown");
} catch(Exception e) {
System.Console.WriteLine("Error retrieving Computer Name from local
registry. " + e.Message);
}

this.serviceProcessInstaller1 = new
System.ServiceProcess.ServiceProcessInstaller();
this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller();
//
// serviceProcessInstaller1
//
this.serviceProcessInstaller1.Account =
System.ServiceProcess.ServiceAccount.User;
this.serviceProcessInstaller1.Password = "somepassword";
this.serviceProcessInstaller1.Username = ComputerName + "\\someusername";

We ran into issues between Windows NT and Windows 2000 that is why we are
having to use the local computer name... Using \\computername worked on
Windows 2000, but did not work on Windows NT. Using the physical computer
name solved the problem.

"Bryan" <br*********@hotmailX.comX> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
We created a Windows Service with C#. The service will start OK on
computers that are a member of a domain, but when we try to start it on a
server that is configured for a workgroup we get the following error in the event log:

Event ID: 7001
Description: The {Service Name}service depends on the Net Logon service
which failed to start because of the following error:
The service has returned a service-specific error code.

When checking the Net Logon service, we noticed that it did not start
because of the following error in the event log:

Event ID: 3095
Description: This Windows NT computer is configured as a member of a
workgroup, not as a member of a domain. The Netlogon service does not need to run in this configuration.

Does this mean we can't run .NET Services on any box that is not a member of a domain?.. I sure hope not!..

Please, please, please someone give me a fix for this.

Thanks,
Bryan

Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.