473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problems getting counter on on remote machine in Intranet using System.Diagnostics...

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 PerformanceCounter("Processor", "% Processor
Time", "_Total", MachineName)
cDiskCounter = New PerformanceCounter("LogicalDisk", "Free
Megabytes", "C:", MachineName)
dDiskCounter = New PerformanceCounter("LogicalDisk", "Free
Megabytes", "D:", MachineName)
eDiskCounter = New PerformanceCounter("LogicalDisk", "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 1213

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

Similar topics

1
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...
7
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
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...
0
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...
1
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...
4
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...
8
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...
0
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. ...
7
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.