473,659 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems getting counter on on remote machine in Intranet using System.Diagnost ics...

Hello all; in need of some assistance. I am currently writing some
software for our companies intranet, and I need for it to specifically
access other machines on the network's Performance counters. Now I ran
all the code against my machine and I can access the counter
information fine. But if I try to create a counter on a remote machine
I get an access denied error; obviously a permissions based issue. Now
I tried setting the assemblies to full trust; but I still can't access
the other intranet computer's counter. So what do I need to do with
the permissions so I can access counters on other computers in my
local intranet?

Relevant code snippet :

Class Computer
Public Sub New(ByVal ComputerName As String)
MachineName = ComputerName

'Breaks on this line if machineName isn't app host
cpuCounter = New PerformanceCoun ter("Processor" , "% Processor
Time", "_Total", MachineName)
cDiskCounter = New PerformanceCoun ter("LogicalDis k", "Free
Megabytes", "C:", MachineName)
dDiskCounter = New PerformanceCoun ter("LogicalDis k", "Free
Megabytes", "D:", MachineName)
eDiskCounter = New PerformanceCoun ter("LogicalDis k", "Free
Megabytes", "E:", MachineName)
End Sub
End Class

If machineName is set to my computer's name, I'm fine. Any other
computer name; access denied.
Nov 20 '05 #1
0 1228

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2537
by: Damian Profancik | last post by:
When my application starts it gets the process collection with GetProcessesByName() on the local machine to see if a copy of the application is already running, if so, it ends. The on some machines the call fails with the error, "Couldn't get process information from remote machine". This seems to be related to a failure in accessing a performance counter, because it cannot get the system ticks. This has only happened on 2 machines out...
7
717
by: Yosh | last post by:
I am developing an application that will stop and start a process on a remote machine. What security rights are needed for my application to be able to do this? Hope this makes sense. Yosh
1
3598
by: db | last post by:
Hello, I am writing a utility to get the performance counters from a remote machine. Currently, I am usign the System.Diagnostics.PerformanceCounter class to retrieve these counters, but they only retrieve the counters with the permissions of the owneer of my utility's process. I dont see any way within this class to provide a different authentication to let the user get the counters with different permissions (windows...
0
3221
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
1
8124
by: Duffman | last post by:
Hi, I have what seems to be a common problem, but the solutions I've found don't seem to work. I would like to use a web service to create a file at a UNC location in a shared file. Currently I'm just running it locally and saving the file locally using my machines UNC path. I have given user ASPNET full control over the folder I want to write the file to. I've also tried using the web config identity impersonation to use my user...
4
14355
by: bartlomiej.szafraniec | last post by:
Hello! How I can gain access to event log on remote machine? Computers are in the same network but they are not in domain, they are only in the same workgroup. I've tried MachineName property in EventLog class but I get exception. I know administrator password on remote computer but how can I say EventLog class "log in to remote computer with this username and password"?
8
2482
by: Mike Owen | last post by:
Hi, I am using the following code to send email on a Windows 2003 Web Server: Imports System.Net.Mail ........ Dim msgmail As New MailMessage msgmail.To.Add(New MailAddress(objMember.EmailAddress)) msgmail.From = New
0
1535
by: supreeth.bhat | last post by:
I created a new Performance Counter Category and added three new counters. Used InstallUtil.exe to create them on remote production server. I can see the custom counter category and counters. I have a web site built with Commerce Server 2002 and .NET 1.1. I am trying to increment and/or decrement counter values for every session start and
7
3994
by: Brian | last post by:
hello Gentlemen, been trying to get a shell program working where I have a Windows service that also has a Notification icon in the system tray..... I got this idea from microsofts Visual Basic .Net cookbook, but cannot seem to get it to work. Also I am using the Visual Studio 2005 not 2003 as original book was I believe created for. and I added an icon resource into the project also. You can add your
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8626
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.