Calling an executable from an .aspx page hosted on Windows 2003

  • Thread starter Marlene Arauz Martin
  • Start date
M

Marlene Arauz Martin

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";
psi.WorkingDirectory=Application["TempDir"].ToString();
System.Diagnostics.Process p= System.Diagnostics.Process.Start(psi );
p.WaitForExit();

I did my development on my computer that is running Windows 2000, and now I
want to deploy on a Windows 2003 server, but the calling to the executable
is not working, I don't even see any error, but I'm pretty sure is a
security issue. I tested configuring IIS 6.0 to run in IIS 5.0 isolation
mode, and it worked.

I'm not familiarize with II6.0, I'm not sure what user I have to give access
to run the executable.

Any ideas???


M.A.R.
 
J

John Saunders

Marlene Arauz Martin said:
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";
psi.WorkingDirectory=Application["TempDir"].ToString();
System.Diagnostics.Process p= System.Diagnostics.Process.Start(psi );
p.WaitForExit();

I did my development on my computer that is running Windows 2000, and now I
want to deploy on a Windows 2003 server, but the calling to the executable
is not working, I don't even see any error, but I'm pretty sure is a
security issue. I tested configuring IIS 6.0 to run in IIS 5.0 isolation
mode, and it worked.

I suggest that you put a try block around this code and display the
exception in the catch clause.
 
M

Mark Shasby

I have exactly the same problem but no exception is thrown, it just
hangs at the Start method: i.e. event 8 is logged but not event 9.

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
8
);

Process.Start(psi);

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
9
);


Any other ideas how to debug this anybody?

John said:
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";
psi.WorkingDirectory=Application["TempDir"].ToString();
System.Diagnostics.Process p= System.Diagnostics.Process.Start(psi );
p.WaitForExit();

I did my development on my computer that is running Windows 2000, and now
I

want to deploy on a Windows 2003 server, but the calling to the executable
is not working, I don't even see any error, but I'm pretty sure is a
security issue. I tested configuring IIS 6.0 to run in IIS 5.0 isolation
mode, and it worked.


I suggest that you put a try block around this code and display the
exception in the catch clause.
 
J

John Saunders

Mark Shasby said:
I have exactly the same problem but no exception is thrown, it just
hangs at the Start method: i.e. event 8 is logged but not event 9.
EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
8
);

try
{
Process.Start(psi);
}
catch (Exception ex)
{
EventLog.WriteEntry(
EVENT_LOG_SOURCE,
ex.ToString(),
EventLogEntryType.Information,
10
);
}

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
9
);
Any other ideas how to debug this anybody?

John said:
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";
psi.WorkingDirectory=Application["TempDir"].ToString();
System.Diagnostics.Process p= System.Diagnostics.Process.Start(psi );
p.WaitForExit();

I did my development on my computer that is running Windows 2000, and
now

I
want to deploy on a Windows 2003 server, but the calling to the executable
is not working, I don't even see any error, but I'm pretty sure is a
security issue. I tested configuring IIS 6.0 to run in IIS 5.0 isolation
mode, and it worked.


I suggest that you put a try block around this code and display the
exception in the catch clause.
 
M

Mark Shasby

Same result - it is already in a try catch as suggested earlier, thanks.
It hangs. try/catch doesn't stop things hanging. Hence the "any OTHER
ideas how to debug this".

John said:
I have exactly the same problem but no exception is thrown, it just
hangs at the Start method: i.e. event 8 is logged but not event 9.

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
8
);

try
{
Process.Start(psi);
}
catch (Exception ex)
{
EventLog.WriteEntry(
EVENT_LOG_SOURCE,
ex.ToString(),
EventLogEntryType.Information,
10
);
}

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
9
);

Any other ideas how to debug this anybody?

John said:
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";
psi.WorkingDirectory=Application["TempDir"].ToString();
System.Diagnostics.Process p= System.Diagnostics.Process.Start(psi );
p.WaitForExit();

I did my development on my computer that is running Windows 2000, and
now
I


want to deploy on a Windows 2003 server, but the calling to the
executable
is not working, I don't even see any error, but I'm pretty sure is a
security issue. I tested configuring IIS 6.0 to run in IIS 5.0
isolation
mode, and it worked.


I suggest that you put a try block around this code and display the
exception in the catch clause.
 
J

John Saunders

Mark Shasby said:
Same result - it is already in a try catch as suggested earlier, thanks.
It hangs. try/catch doesn't stop things hanging. Hence the "any OTHER
ideas how to debug this".

You had not previously indicated that it was in a try block.

Your code with the event logging is a bit different than your earlier code
(with the WaitForExit). If WaitForExit is still there, are you sure the code
is blocking on the Start and not on the WaitForExit?

Also, is the entire site frozen, or just the one request?
--
John Saunders
johnwsaundersiii at hotmail
John said:
I have exactly the same problem but no exception is thrown, it just
hangs at the Start method: i.e. event 8 is logged but not event 9.

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
8
);

try
{
Process.Start(psi);
}
catch (Exception ex)
{
EventLog.WriteEntry(
EVENT_LOG_SOURCE,
ex.ToString(),
EventLogEntryType.Information,
10
);
}

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
9
);

Any other ideas how to debug this anybody?

John Saunders wrote:



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";
psi.WorkingDirectory=Application["TempDir"].ToString();
System.Diagnostics.Process p= System.Diagnostics.Process.Start(psi );
p.WaitForExit();

I did my development on my computer that is running Windows 2000, and
now

I


want to deploy on a Windows 2003 server, but the calling to the
executable

is not working, I don't even see any error, but I'm pretty sure is a
security issue. I tested configuring IIS 6.0 to run in IIS 5.0
isolation

mode, and it worked.


I suggest that you put a try block around this code and display the
exception in the catch clause.
 
J

John Saunders

Mark Shasby said:
Same result - it is already in a try catch as suggested earlier, thanks.
It hangs. try/catch doesn't stop things hanging. Hence the "any OTHER
ideas how to debug this".

Here's another thought. Have you tried this with other executables? In
particular, try writing a console program which does nothing - not even
writing "Hello, world". It should just exit. Then try starting that program
(using the full path to the executable). See if it works.
--
John Saunders
johnwsaundersiii at hotmail

John said:
I have exactly the same problem but no exception is thrown, it just
hangs at the Start method: i.e. event 8 is logged but not event 9.

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
8
);

try
{
Process.Start(psi);
}
catch (Exception ex)
{
EventLog.WriteEntry(
EVENT_LOG_SOURCE,
ex.ToString(),
EventLogEntryType.Information,
10
);
}

EventLog.WriteEntry(
EVENT_LOG_SOURCE,
"see event number",
EventLogEntryType.Information,
9
);

Any other ideas how to debug this anybody?

John Saunders wrote:



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";
psi.WorkingDirectory=Application["TempDir"].ToString();
System.Diagnostics.Process p= System.Diagnostics.Process.Start(psi );
p.WaitForExit();

I did my development on my computer that is running Windows 2000, and
now

I


want to deploy on a Windows 2003 server, but the calling to the
executable

is not working, I don't even see any error, but I'm pretty sure is a
security issue. I tested configuring IIS 6.0 to run in IIS 5.0
isolation

mode, and it worked.


I suggest that you put a try block around this code and display the
exception in the catch clause.
 

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

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top