473,890 Members | 1,815 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling Process.Start from Webservice method hangs after first call

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

Mar 19 '07 #1
7 5626
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.

<ch************ @googlemail.com wrote in message
news:11******** *************@d 57g2000hsg.goog legroups.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

Mar 19 '07 #2
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

Mar 19 '07 #3
the spawned program is probably waiting for console input, and your app
is not sending any.
-- bruce (sqlwork.com)
ch************@ googlemail.com 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
Mar 19 '07 #4
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

Mar 20 '07 #5
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.

<ch************ @googlemail.com wrote in message
news:11******** **************@ y80g2000hsf.goo glegroups.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

Mar 20 '07 #6
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

Mar 20 '07 #7
<ch************ @googlemail.com wrote in message
news:11******** *************@l 75g2000hse.goog legroups.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
Mar 20 '07 #8

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

Similar topics

15
11800
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that performs the query is contained in a delegate function that I execute via a second thread. On 1 or 2 of the 600+ servers the query hangs. I've tried to use Thread.Join() coupled with a Thread.Abort() but this does not kill the thread. Based on...
1
5798
by: Bucky Pollard | last post by:
I have a web service that needs to create a batch file and call it (since there are no APIs for the functionality I am looking for). I am using the Process and ProcessStartInfo objects. When I try to call the batch file, it just returns with a return code of 1. When I call cmd.exe, and pass the batch file as a parameter it hangs. After much frustration and aggrevation, I found that CMD IS in fact running, but it is running under the context...
8
1738
by: Rob Kellow | last post by:
Hello, I'm working on an application for use within my company on our intranet that will be used to gather some information and store some of the info in a SQL Server database and the rest of the information will be used to initiate either a MS Word or MS Excel document. The applications (Word & Excel) reside on the users local system but the database is on the server. Since it is for internal company use I'm not too concerned about...
6
1907
by: Marlene Arauz Martin | last post by:
Hello, How's everybody??? I have an aspx. page that is calling an executable,....like this... System.Diagnostics.ProcessStartInfo psi= new System.Diagnostics.ProcessStartInfo(); psi.FileName="RATE2.exe";
1
6747
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name this WebService1. (using Apache Axis 1.1) Scenario 1: -----------
1
3331
by: BenS | last post by:
Good Morning and Happy Wednesday! I've got a web service that exposes a method that takes an string input parameter that specifies an executable on the server that starts a process. These processes should runs in a Windows window. The process loads and runs under the ASPNET user account fine but the window is hidden. The Windows task manager shows that the process has loaded and the code performs the intended task (just deletes some...
0
7248
by: Paul | last post by:
Hi, I'm trying to kick off the iiscnfg.vbs from a webservice to export a website's config to an xml file (And eventually populate other servers with the config). I initially tried this using the 1.1 framework, but discovered that when I used Process.Start() the user's credentials were not impersonated, it just kept using the asp.net's user, so I switched the webservice over to 2.0 as Diagnostics.Process.StartInfo now has username,...
0
1755
by: =?Utf-8?B?QWRhbUM=?= | last post by:
Hi, I'm wondering if you can help. We have a classic asp application that creates and posts some XML using the SOAP format to a .NET WebService. The WebService and the asp are on the same IIS server , which is IIS6.0. On first calling the WebService the asp page either hangs or returns Active Server Pages error 'ASP 0113' Script timed out /adminw/logon/DeleteUser.asp
5
3316
by: Saya | last post by:
Hi Folks, I have now spend app. 3 days to get the below scenario to work, but can not get there! ..Net version = 2.0.50727 Windows version = Microsoft Windows = Windows Server 2003 Now I have to develop a webservice which is run on the server. The
0
9976
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9814
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
11214
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
10801
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10903
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10449
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
9616
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...
0
5834
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...
0
6034
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.