Process can't run in ASP.Net

C

cct

Dear all,

Running on on Windows XP Professionals with SP2.
Below code can run well in Consol application with task scheduler
successfully created.

But when I run in Asp.net,
with windows authentication selected and I'm login as Administrator,
No error prompt but no task scheduler has been created.

*******************
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = @"schtasks.exe";psi2.Arguments = @" /create /tn abc /tr
""c:/test.exe 282"" /sc once /st ""10:10:00"" /sd ""01/07/2005"" /ru
""System""";


psi.UseShellExecute = false;
psi.WindowStyle=ProcessWindowStyle.Hidden;

Process process = Process.Start(psi);
process.WaitForExit();
process.Close();

****************
do anyone know?

Many Thanks.
 
R

Raterus

I can tell you that when you start a process like this in asp.net, it will be ran as the "ASPNET" user, regardless of which authentication/impersonation you have configured. I've never found a way to pass their authentication on to this process.
 

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,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top