"Access Denied" using public static Process Start(string, string);

E

EJS

We are using Network Associates VirusScan to check files uploaded from a web
page for viruses.
The code below worked fine using .Net 1.1 on Win2000. The ASP.Net user
account was given permissions to run the EXE and access to the files being
scanned.

When we migrated to Win2003 we ran into problems. ASP.Net now runs under the
Network Services account. So we gave this account the same privilages but
the code throws an System.ComponentModel.Win32Exception "Access is Denied"

If we add the Network Services account to the "Administrators" group the
code executes WITHOUT error.

Any help would be greatly appreciated
Thanks in advance.
Ed

CODE:
//Run Virus Scan
oCmd = Process.Start(sScanExe, sFilePath); <---- ERROR

//Wait for iScanTimeOut mSec
//If OS exited the procees true is returned if timed out false is returned
bNormalExit = oCmd.WaitForExit(iScanTimeOut);
iErrorCode = oCmd.ExitCode;
oCmd.Close();

Error Log:
; Source: System
; Description: Access is denied
; Stack: at
System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo
startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(String fileName, String arguments)
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top