Try this:
In the folder the FileConverter.exe resides:
- Give "Everyone" read/write/execute access (make sure to change any other
user accounts you already have set up for that folder)
Try running it - if it works, you had a permissions issue for that folder,
but I would recommend taking out the "Everyone" account as soon as possible
and figuring out the correct ASPNET or IUSER_[MACHINE_NAME] account(s) that
need permission.
If it doesn't work, do the same for whatever folders this particular
application is accessing - it sounds like you're manipulating files, so
wherever any file reading/writing is being done, give "Everyone" read/write
access to those as well.
If this works, you had a permissions problem with that folder. If not, I'm
sorry that's all I can think of right now.
If that doesn't help you and you have control over the source for this
FileConverter.exe, figure out a way to pull the applicable routines into a
sharable class that you can use in both the FileConverter.exe and your web
app. Again you're going to need read/write permissions to the folder you're
manipulating files in, but at least it takes out the possibility that there's
a problem executing the windows app.
"Michael" wrote:
Quote:
Hello,
I am in serious need of help. I have an ASP.NET application written in C#.
I have a page that processes a file on the web server. The page uses a class
I created and stored in the AppCode directory. In the class method I am
trying to run a program on my web server that will convert the file for me.
Here is a snipit of code:
>
System.Diagnostics.Process proc = new System.Diagnostics.Process();
>
proc.StartInfo.FileName = sDir + "App_LocalResources\\FileConverter.exe";
proc.StartInfo.Arguments = "-i " + filename + "." + extension;
>
proc.EnableRaisingEvents = false;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
>
>
proc.Start();
proc.WaitForExit(99999999);
>
if (!proc.HasExited)
proc.Kill();
proc.Close();
>
>
The problem is that as soon as my code gets to proc.Start I get an 'Access
is Denied' error. I have tried everything I could think of or find on the
web. Could someone please help me out with this?
>
Thank you,
Michael