Hello all,
Scenario: I have developed a vb.net windows service to log on to exchange
via impersonation. Exchange system is version 2000 on WIndows 2000.
Development platform win xp framework 1.1
I am trying to get vb.net to impersonate a user. I have found several
examples, and all of them seem to use the logonuser/duplicatetoken functions
from advapi32.
These functions seem to work fine, and I manage to logon and make a
duplicate token and then I use WindowsIdentity to impersonate. All ok. But
the result isnt what I am after. If my user is correctly impersonated, I
should get that user returned from my mapi session info, but I dont. I get
user = unknown.
Have anyone managed to get a correct (verified) impersonation going under a
service? What I am after is not having to set the "Log on as" in the service
settings. I want to use Local System and then have the service impersonate,
but I just cant get it to work.
I can post code if need be.
Thanks,
Rune
Scenario: I have developed a vb.net windows service to log on to exchange
via impersonation. Exchange system is version 2000 on WIndows 2000.
Development platform win xp framework 1.1
I am trying to get vb.net to impersonate a user. I have found several
examples, and all of them seem to use the logonuser/duplicatetoken functions
from advapi32.
These functions seem to work fine, and I manage to logon and make a
duplicate token and then I use WindowsIdentity to impersonate. All ok. But
the result isnt what I am after. If my user is correctly impersonated, I
should get that user returned from my mapi session info, but I dont. I get
user = unknown.
Have anyone managed to get a correct (verified) impersonation going under a
service? What I am after is not having to set the "Log on as" in the service
settings. I want to use Local System and then have the service impersonate,
but I just cant get it to work.
I can post code if need be.
Thanks,
Rune