Path Problems

N

nunommagalhaes

Hello,

When I start a process in a service OnStart event, the service fails
to start and the event log tells me this:
"Service cannot be started. System.ComponentModel.Win32Exception: No
network provider accepted the given network path".

I don't think I'm using network paths. It's just a path to an
executable on the local disk.

On one machine with the Windows Server 2003 there is no problem, on
the other machine with the same operating system the service won't
start.

Can anynone tell me how to make the service start?
Thanks.
 
P

Peter Morris

I don't think I'm using network paths.

What is the path, and does the user the service is running under have
permissions to access it? If not, give it permission.
 
I

Ignacio Machin ( .NET/ C# MVP )

Hello,

When I start a process in a service OnStart event, the service fails
to start and the event log tells me this:
"Service cannot be started. System.ComponentModel.Win32Exception: No
network provider accepted the given network path".

I don't think I'm using network paths. It's just a path to an
executable on the local disk.

On one machine with the Windows Server 2003 there is no problem, on
the other machine with the same operating system the service won't
start.

Can anynone tell me how to make the service start?
Thanks.

what is the path?
under what user you are running it?
are you sure the same path exists in both servers?
 
N

nunommagalhaes

what is the path?
under what user you are running it?
are you sure the same path exists in both servers?- Ocultar texto citado -

- Mostrar texto citado -

I'm not shure but the path is built from an environment variable (C:
\Application) and a relative path (\bin\Exec.exe ) thus ending in C:
\Application\bin\Exec.exe. I'm setting the working directory of the
process with the Path.GetDirectoryName from the path.
It is running as a "Local System" service.
Yes, it exists on both servers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top