Re: Performance monitoring: strange error in .Net 2.0
- From: Lucvdv <replace_name@xxxxxxxx>
- Date: Fri, 06 Jan 2006 15:28:20 +0100
On Fri, 6 Jan 2006 11:44:20 +0100, "Willy Denoyette [MVP]"
<willy.denoyette@xxxxxxxxxx> wrote:
> It works for me, did you check the impersonating identity in your timer
> event handler?
Did you try the code I posted, or construct your own?
It fails in VS.Net 2005 here, while it runs successfully in VS.Net 2003.
This is some output under the VS.2005 debugger:
| Logon OK
| 0, 0
| A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
| -1, 26431.12
| A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
| -1, 26431.62
| A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
| -1, 26432.1
This is what it gives under VS.2003:
| Logon OK
| 0, 0
| 3.12376, 26521.38
| 0, 26521.88
| 0, 26522.38
| 3.12376, 26522.88
| 1.561242, 26523.38
To test it, I started under an account with administrator rights and
impersonated another account with administrator rights (neither of the two
the 'original' administrator created by setup, but both new accounts that
were removed from 'users' and put in the administrators group instead).
> Note also that your code is impersonating an interactive logon type, why?
The real app uses either interactive or LOGON32_LOGON_NEW_CREDENTIALS,
depending on settings.
It's not a web app, but a simple windows forms app that has to connect to a
SQL server that may be running either locally or on another machine.
The user's own account will not always have access to the server, the app
impersonates another account for that reason.
Remote works with NEW_CREDENTIALS, but it refused to work locally if I
didn't use interactive logon. It might work if I force it to connect to
the server differently (force TCP/IP), but the overhead for the new logon
didn't look too high (you don't notice any delay).
I can still (and maybe will) change it later, the app is only half finished
yet.
.
- Follow-Ups:
- Re: Performance monitoring: strange error in .Net 2.0
- From: Willy Denoyette [MVP]
- Re: Performance monitoring: strange error in .Net 2.0
- References:
- Performance monitoring: strange error in .Net 2.0
- From: Lucvdv
- Re: Performance monitoring: strange error in .Net 2.0
- From: Lucvdv
- Re: Performance monitoring: strange error in .Net 2.0
- From: Willy Denoyette [MVP]
- 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):
Relevant Pages
|