Re: Performance monitoring: strange error in .Net 2.0
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Fri, 6 Jan 2006 11:44:20 +0100
"Lucvdv" <replace_name@xxxxxxxx> wrote in message
news:3bfsr1t3ocglg73dt6tsqdoq6p9mkco9ne@xxxxxxxxxx
| On Thu, 05 Jan 2006 16:18:46 +0100, Lucvdv <replace_name@xxxxxxxx> wrote:
|
| > There seems to be a strange interaction/conflict between
| > System.Diagnostics.PerformanceCounter objects and
| > System.Security.Principal.WindowsIdentity.Impersonate() in CLR 2.0, that
| > didn't exist in 1.1.
| <snip>
|
|
| It's working through a workaround in my app now, but it still looks like a
| bug in CLR 2.0 to me.
|
| My workaround is starting a separate thread before logging on to the other
| account. That thread creates the performance objects, reads the counter
| values at regular intervals, and sends them to the main code (form)
through
| Invoke.
It works for me, did you check the impersonating identity in your timer
event handler?
Note also that your code is impersonating an interactive logon type, why?
This is not needed, you should use batch or network type logons, interactive
is way too expensive and you need to create an impersonating token from the
direct token which is another expensive action.
Willy.
.
- Follow-Ups:
- References:
- Performance monitoring: strange error in .Net 2.0
- From: Lucvdv
- Re: Performance monitoring: strange error in .Net 2.0
- From: Lucvdv
- Performance monitoring: strange error in .Net 2.0
- Prev by Date: Re: Performance monitoring: strange error in .Net 2.0
- Next by Date: Re: Performance monitoring: strange error in .Net 2.0
- Previous by thread: Re: Performance monitoring: strange error in .Net 2.0
- Next by thread: Re: Performance monitoring: strange error in .Net 2.0
- Index(es):
Loading