Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Process.Start() fails

Reply
Thread Tools

Process.Start() fails

 
 
Mervin Williams
Guest
Posts: n/a
 
      01-27-2010
I am trying to call a console application from within my ASP.NET application. The strErrors variable returns:

"System.Configuration.ConfigurationErrorsException : Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access is denied.
---> System.Security.SecurityException: Access is denied."
Here is the code. The executable referred to by the PAMWriterPath points to a custom executable and resides on the same pc. I've given the ASP.NET webapp's Anonymous user account full access to the conole application's directory. Any help would be greatly appreciated.

Process p = new Process();

p.StartInfo.FileName = ConfigurationSettings.AppSettings["PAMWriterPath"];
p.StartInfo.Arguments = "PostSub";
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;

p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
bool started = p.Start();

StreamWriter sIn = p.StandardInput;
sIn.AutoFlush = true;
StreamReader sOut = p.StandardOutput;
StreamReader sErr = p.StandardError;

p.WaitForExit();
sIn.Close();

string strErrors = sErr.ReadToEnd();
sErr.Close();

if (strErrors.Length > 0)
bret = false;

sOut.Close();
p.Close();
Thanks in advance,

Mervin Williams


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Constant.t fails 240 of 272 tests and recurs.t fails 1 of 25 tests on HPUX using perl 5.8.7 dayo Perl Misc 11 12-16-2005 09:09 PM
slideshow fails, Firefox debugger also fails lkrubner@geocities.com Javascript 2 12-23-2004 06:22 PM
Wireless Zero Configuration Servoce fails to start andrew Wireless Networking 0 07-28-2004 03:08 PM
IAS fails with certs from Stand Alone CA Harrison Midkiff Wireless Networking 2 07-22-2004 09:45 PM
Forms Authentication Fails Between ASP.NET 1.0 and 1.1 Applications (Cookie Decryption Fails) John Saunders ASP .Net 1 11-18-2003 03:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57