Solved

Exception Details: System.ComponentModel.Win32Exception: Access is denied

Posted on 2007-04-04
7
6,356 Views
Last Modified: 2011-09-20
Hi people.

i have a rather annoying problem.  I am trying to execute an exe called PDF2SWF from a .net dll whch in turn is being called from a webpage.  This is the code i am using to call it

private string ConvertToSwf(string filename, string appPath)
{            
      string swfName = "";
      try
      {
            FileInfo file = new FileInfo(filename);
            string arguments = "\"" + file.FullName + "\"";
            swfName = Path.Combine(m_outputPath, Path.GetFileNameWithoutExtension(file.Name) + ".swf");
            arguments += " \"" + swfName + "\"";
               
            ProcessStartInfo procStart = new ProcessStartInfo(appPath, arguments);

            procStart.UseShellExecute = true;
            procStart.WindowStyle = ProcessWindowStyle.Hidden;
            Process console = new Process();
            console = new Process();

            console.StartInfo = procStart;
            console.Start();

            console.WaitForExit();
            console.Close();
            console.Dispose();
      }
      catch (Exception ex)
      {
            CLogger.AddLogEntry("Unable to load Thumb Generator : " + ex.ToString());
      }
      return swfName;
}

when i try to execute the exe directly from the DLL i et no errors it just doesnt work, however when i try to execute a batch file from the dll which in turn calls the exe i get this error:

System.ComponentModel.Win32Exception: The system cannot find the file specified

Note:

The strange thing is that at one point it did work, no problem, but i was having other problems so i had the change the code, but by fixing that i seemed to have broken this - the fix wasnt related t ths but it still refuses to work.

Any ideas?
0
Comment
Question by:apresto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 9

Expert Comment

by:sun4sunday
ID: 18849494
have a look on this
http://support.microsoft.com/?id=329291

sun4sunday
0
 
LVL 23

Author Comment

by:apresto
ID: 18849755
Thanks for the reply,  But i dont understand, the link explains something different, im not trying to write to the event log - i googled and found that yesterday too
0
 
LVL 23

Author Comment

by:apresto
ID: 18850644
I fixed my problem i will ask for a delete
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 9

Expert Comment

by:sun4sunday
ID: 18855515
If you can share the solution, it will help for all and you can ask for a refund.
sun4sunday
0
 
LVL 23

Author Comment

by:apresto
ID: 18990694
i had unregistered my dll and not re registered - i believe this was the problem anyway
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19229759
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Create a Dropdown list with sub group 10 43
SP result not being displayed 5 69
Need to update SSL certificate on SBS 2011 7 82
How do you think this website does searches? 5 35
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question