Wrox Programmer Forums
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 26th, 2004, 01:29 PM
Authorized User
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access is Denied

I am trying to do an exercise in ASP.NET to get the "Getting Performance Information."
Every work is on my local machine and I have administrative access to the local machine.
This is my codes for click button event.
        private void btnLoadProcessData_Click(object sender, System.EventArgs e)
        {
            //Clear all listbox

            this.lbModules.Items.Clear();
            this.lbProcesses.Items.Clear();
            this.txtModuleInfo.Text = "";

            //Get all the processes
            Process[] arrProcesses = Process.GetProcesses(this.txtMachineName.Text);
            foreach(Process p in arrProcesses)
            {
                //Add each process into the lvwProcesses
                this.lbProcesses.Items.Add(p.Id.ToString() + " " + p.ProcessName);
            }
        }

Whenever I run my exercise, I get the error "Access is Denied" at this line "Process[] arrProcesses = Process.GetProcesses(this.txtMachineName.Text);"

Has anyone had this problem? Please help.

Thanks.
 
Old March 26th, 2004, 04:44 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Is the process accessing a folder or file? Does the <MachineName>\ASPNET account have access to it?

Not sure what this is doing; not familiar with this...

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
401.3 Access denied due to Access Control List cforsyth .NET Framework 2.0 8 May 28th, 2009 01:56 PM
access is denied shanwaj ASP.NET 1.0 and 1.1 Basics 0 December 28th, 2007 03:04 AM
Access Denied tys MySQL 4 April 6th, 2007 08:31 AM
Access is denied. Ramakrishna General .NET 4 November 30th, 2004 09:05 AM
Access Denied tys MySQL 0 March 25th, 2004 03:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.