Solved

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

Posted on 2007-04-04
7
6,332 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

919 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now