Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / November 2005

Tip: Looking for answers? Try searching our database.

Anyone ever seen this "System.ComponentModel.Win32Exception: Access is denied Exception."

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Microsoft News - 15 Nov 2005 21:48 GMT
I have a program that is printing PDFs and to check that the PDF is complete
we run the following code after we are done printing.

           lpsProcesses = Process.GetProcesses

           For Each lpsProcess In lpsProcesses
               If lpsProcess.ProcessName.CompareTo("Acrobat") = 0 Then
                   lpsProcess.Close()
               End If
           Next

Now this works great on most of my users computer.  But on some users
computers, all at the same company, on the same domain, etc. this code
generates the following error:

System.ComponentModel.Win32Exception: Access is denied
  at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32
access, Boolean throwIfExited)
  at System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId)
  at System.Diagnostics.Process.get_Modules()
  at System.Diagnostics.Process.get_MainModule()
  at System.Diagnostics.Process.get_ProcessName()
  at ActNotesMod.frmPreview.PrintPA(IPDFPrinter pobjPrinter, Boolean
pbUseDefaultPrinter, String psPrinterName)
  at ActNotesMod.frmActNotes.OutputPDF(Boolean pbPrint)

It is my belief that the problem is some type of rights issue with some
process that I do not know.  Anyone out there that knows what a user has to
have rights to in order to run this code and use the "System.Diagnostics"
object?

The file they are printing is in their Document and Settings folder so they
have full access.  They are network users so they are not admins on the
computers.

Any help would be GREAT!!!!!!!!!!

Clyde
atonyba - 16 Nov 2005 17:50 GMT
A few basic questions, as I am facing a similar problem:
- are all the client machines running the same OS?
- what is the security context that your component is using i
Component Services?
- Are your components local to all machines, or are you running the
remotely?

-Ton

--
atonyb

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.