473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

exe does not complete under IIS

Mo
I have the code below which sets arguments for an executable (exe) and
run it in a web page. the code works fine if in debug mode and I can
run the executable through command prompt but under IIS control it
appears that it does not execute and I can not find any errors. it has
got to be something about permissions but I have execute permissions
set to scripts and executables set. I have assigned full permissions
to ASPNEt, Network Service and host of other accounts without any
luck. The process returns a value of "0" after completion but it
really does not do what it is supposed to do. Does anybody have any
suggestions about what could be wrong?

Process process = new Process();
process.StartInfo.FileName = MyExecutable;

process.StartInfo.WorkingDirectory = new
FileInfo(MyExecutable).DirectoryName;
process.StartInfo.CreateNoWindow = true;

process.StartInfo.Arguments = arguments;

process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true;

process.Start();

Trace.Warn("Process Started");
try

{

if (!process.WaitForExit(waitForExitMilliseconds))
{

ShowError("The application did not complete within an appropriate time
period.");
}

else

{

string executableErrorMessage = process.StandardError.ReadToEnd();if
(executableErrorMessage.Length != 0)
{

Trace.Warn(executableErrorMessage);

ShowError("An error occurred running the executable: " +
executableErrorMessage);
}
Oct 21 '08 #1
1 1682
Hi,

I hope this helps

http://support.microsoft.com/kb/555134

however, I don't think it's a good practice to do what you want because of
the security issues related =(

Cheers,
--
Angel J. Hernández
MCP,MCAD,MCSD,MCDBA
Microsoft MVP (ASP/ASP.NET)
mailto:an**********@hotmail.com

*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Technical Solution Architect
http://www.customware.net

"Mo" <le******@yahoo.comwrote in message
news:1c**********************************@s9g2000p rg.googlegroups.com...
>I have the code below which sets arguments for an executable (exe) and
run it in a web page. the code works fine if in debug mode and I can
run the executable through command prompt but under IIS control it
appears that it does not execute and I can not find any errors. it has
got to be something about permissions but I have execute permissions
set to scripts and executables set. I have assigned full permissions
to ASPNEt, Network Service and host of other accounts without any
luck. The process returns a value of "0" after completion but it
really does not do what it is supposed to do. Does anybody have any
suggestions about what could be wrong?

Process process = new Process();
process.StartInfo.FileName = MyExecutable;

process.StartInfo.WorkingDirectory = new
FileInfo(MyExecutable).DirectoryName;
process.StartInfo.CreateNoWindow = true;

process.StartInfo.Arguments = arguments;

process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true;

process.Start();

Trace.Warn("Process Started");
try

{

if (!process.WaitForExit(waitForExitMilliseconds))
{

ShowError("The application did not complete within an appropriate time
period.");
}

else

{

string executableErrorMessage = process.StandardError.ReadToEnd();if
(executableErrorMessage.Length != 0)
{

Trace.Warn(executableErrorMessage);

ShowError("An error occurred running the executable: " +
executableErrorMessage);
}
Oct 22 '08 #2

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

Similar topics

0
by: Dustin Lee | last post by:
Seems like py-complete.el offers some cool features, if I could only get it to work. >From the file ;; 1. hippie-expand support via try-complete-py-complete-symbol, ;; just like the...
12
by: Anders Eriksson | last post by:
Hello! I'm trying to create a program that will watch a directory and when a file is created print that file. I have used FileSystemWatcher for watching the directory and I get an created event....
5
by: Brakeshoe | last post by:
I would like to find out how to turn on the Auto Complete variable names feature while editing source code in Visual Studio. It seems to appear on intermittantly, and when it does the variable...
8
by: Andreas R. | last post by:
Hi again, I'm using Python's asynchat module for networking. When calling the sendall() method of asynchat, I sometimes get the error message "the operation could not complete without...
1
by: Deepan Chakravarthy | last post by:
Hi, I am using fedora core 5. I would like to have auto complete in python prompt and history. How do i get it enabled ? i have .pystart file and .pyhist file setup. thanks Deepan...
130
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places...
4
by: Weston | last post by:
I've been playing around with some means of testing image loading, and noticing that the "complete" property seems to default to true. Trying the following in the squarefree javascript shell: I...
0
drhowarddrfine
by: drhowarddrfine | last post by:
I see these mistakes over and over again. Follow them and you can get a quicker and better answer to your questions. Include a link to your page or the complete HTML and CSS. A picture of the...
3
by: TS | last post by:
I am using IE 7. I have a website running on my local machine (localhost) and auto complete doesnt work for any of the textboxes, but going to web sites on the internet does support this so i know...
4
by: urneer | last post by:
How does TCP/IP work. How does complete internet work.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.