[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

C# windows service freezes on System.Diagnostics.Process.Start(info

Daniel

5/31/2006 8:47:00 PM

C# windows service freezes on System.Diagnostics.Process.Start(info)

When I launch PSCP from a C# windows service and launch pscp 0.53 there are
no issues. but when I use C# windows service to launch pscp 0.58 C# freezes
in System.Diagnostics.Process.Start(info)? pscp 0.58 works fine at command
line, but causes C# to freeze on ystem.Diagnostics.Process.Start(info) also
i noticed that the pscp process does not show in taske manager while
ystem.Diagnostics.Process.Start(info) is hanging. Reguardless of the
implementation of PSCP, how can ystem.Diagnostics.Process.Start(info) ever
freeze while the target exe is not loaded in task manager?


1 Answer

William Sullivan

7/6/2006 7:37:00 PM

0

Try running pscp asynchronously. If you need to block the current thread
until it is completed, you might find that version 0.58 may not work for you,
if it's freezing when running from Process.Start. If I were to guess, I'd
think that pscp is trying to do something that requires specific security
rights, and when it fails (due to the user account your service is running
under) its not handling the failure gracefully; it just locks up. You can
also try to use Sysinternal's regmon and filemon to see what registry
keys/files pscp is attempting to manipulate when it starts up. That might
give you a hint as to why it's failing.

"Daniel" wrote:

> C# windows service freezes on System.Diagnostics.Process.Start(info)
>
> When I launch PSCP from a C# windows service and launch pscp 0.53 there are
> no issues. but when I use C# windows service to launch pscp 0.58 C# freezes
> in System.Diagnostics.Process.Start(info)? pscp 0.58 works fine at command
> line, but causes C# to freeze on ystem.Diagnostics.Process.Start(info) also
> i noticed that the pscp process does not show in taske manager while
> ystem.Diagnostics.Process.Start(info) is hanging. Reguardless of the
> implementation of PSCP, how can ystem.Diagnostics.Process.Start(info) ever
> freeze while the target exe is not loaded in task manager?
>
>
>