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

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 = "";
            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;

      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


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?
LVL 23
Who is Participating?
Computer101Connect With a Mentor Commented:
PAQed with points refunded (500)

EE Admin
have a look on this

aprestoAuthor Commented:
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

aprestoAuthor Commented:
I fixed my problem i will ask for a delete
If you can share the solution, it will help for all and you can ask for a refund.
aprestoAuthor Commented:
i had unregistered my dll and not re registered - i believe this was the problem anyway
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.