Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Calling Process.Start from Webservice method hangs after first call

Reply
Thread Tools

Calling Process.Start from Webservice method hangs after first call

 
 
christian13467@googlemail.com
Guest
Posts: n/a
 
      03-19-2007
Hi,

I'm using ASP.Net 2.0 with IIS 6.0 on windows server 2003 sp1. Calling
a commandline program or a cmd file using Process.Start inside a
webservice method. The call to Process.Start returns once after
restarting the iis. A second call to my webservice method never
returns.

I found some post wich where fixed checking access rights. I added
ASPNET to administrators group with no success.

My question is why the call hangs second time?
Any idea,

Christian

 
Reply With Quote
 
 
 
 
Aidy
Guest
Posts: n/a
 
      03-19-2007
The answer depends on what this command-line app is doing. The general
advice is to just not do what you're doing. Just cos you can spawn
processes doesn't mean it is suitable to spawn any application you want from
an asp.net page.

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi,
>
> I'm using ASP.Net 2.0 with IIS 6.0 on windows server 2003 sp1. Calling
> a commandline program or a cmd file using Process.Start inside a
> webservice method. The call to Process.Start returns once after
> restarting the iis. A second call to my webservice method never
> returns.
>
> I found some post wich where fixed checking access rights. I added
> ASPNET to administrators group with no success.
>
> My question is why the call hangs second time?
> Any idea,
>
> Christian
>



 
Reply With Quote
 
 
 
 
christian13467@googlemail.com
Guest
Posts: n/a
 
      03-19-2007
Hi Aidy,

the command line app is generating some some data and building a pdf
file which my webservice method has to deliver back. It runs all fine,
if I do that with a standard c# program. But something in asp.net is
blocking the call. Do you know who?

Cheers,
Christian

 
Reply With Quote
 
bruce barker
Guest
Posts: n/a
 
      03-19-2007
the spawned program is probably waiting for console input, and your app
is not sending any.


-- bruce (sqlwork.com)


http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi,
>
> I'm using ASP.Net 2.0 with IIS 6.0 on windows server 2003 sp1. Calling
> a commandline program or a cmd file using Process.Start inside a
> webservice method. The call to Process.Start returns once after
> restarting the iis. A second call to my webservice method never
> returns.
>
> I found some post wich where fixed checking access rights. I added
> ASPNET to administrators group with no success.
>
> My question is why the call hangs second time?
> Any idea,
>
> Christian
>

 
Reply With Quote
 
christian13467@googlemail.com
Guest
Posts: n/a
 
      03-20-2007
Hi bruce,

the program itself is not asking for anything. I can run the program
as logged on user without any error or warnings.
It might be that someone else is poping up what I cannot see because
its not shown. Are there some restrictions in calling processes from
asp.net?

Cheers,
Christian

 
Reply With Quote
 
Aidy
Guest
Posts: n/a
 
      03-20-2007
If it is generating a pdf file I'd first check that your anonymous asp.net
user has write access on the directory it is saving the file to.

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi Aidy,
>
> the command line app is generating some some data and building a pdf
> file which my webservice method has to deliver back. It runs all fine,
> if I do that with a standard c# program. But something in asp.net is
> blocking the call. Do you know who?
>
> Cheers,
> Christian
>



 
Reply With Quote
 
christian13467@googlemail.com
Guest
Posts: n/a
 
      03-20-2007
I made him an administrator.

The curios moment is, that the program starts and runs in the
background. But simply the call Process.Start never returns. I put it
into an exception handler, but there is no exception thrown.

- Christian

 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      03-20-2007
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>I made him an administrator.
>
> The curios moment is, that the program starts and runs in the
> background. But simply the call Process.Start never returns. I put it
> into an exception handler, but there is no exception thrown.


You should put some exception logging into the PDF program. Don't just make
the user an administrator and assume that you've succeeded, so it must be
something else.

What would have happened if, for some other reason, the user had been able
to write to the output directory? Would the program have written an error
message to the system event log? If so, then look at the event log to see if
that happened when started by ASP.NET.

If not, then add the code to write error messages to the event log (not to a
file!). Then try again and see what happens.

John


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Asynchronous Call of WebService method within a WebService RenÚ Preu▀ler ASP .Net Web Services 0 10-29-2008 11:55 AM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 1 01-26-2006 12:05 PM
Problem! webservice.htc calling nonsecure webservice from a secured ssl https webpage batista ASP .Net 0 01-26-2006 08:13 AM
Clear hangs up - & hangs up - & hangs up Sue Bilstein NZ Computing 26 03-07-2004 01:33 AM
Webservice calling a webservice.....Error Peter Nordstr÷m ASP .Net Web Services 0 10-21-2003 12:02 PM



Advertisments