473,385 Members | 1,813 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.

is vb.net impersonating impersonation?

h
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

Nov 20 '05 #1
0 1363

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

Similar topics

3
by: Picho | last post by:
Hi all, I am trying to write a secure application and some of you have been very helpful on that subject. the only question remaining open after implementing certain methodologies is this: ...
3
by: Daniel | last post by:
Is it possible to retain local file system read, write, delete access while impersonating for access to a remote drive in a different domain? I need to be able to move files from a local computer...
7
by: Jason | last post by:
I have an ASP.NET application with forms authentication. However, the login details correspond to a Windows account (I cannot use Windows authentication). If I obtain a token with LogonUser, can I...
0
by: h | last post by:
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...
6
by: CJM | last post by:
I use the following technique to impersonate a user in ASP, in order to query active directory: http://support.microsoft.com/default.aspx?scid=kb;EN-US;248187 Although the article indicates...
5
by: fab | last post by:
Hello, i'm trying to browse a UNC share through an ASP.NET application and i've got a problem : i've tried some examples from MSDN or other web sites (using LogonUser from Win32 API) and it...
4
by: =?iso-8859-1?q?Eir=EDkur_Fannar_Torfason?= | last post by:
I'm wrestling with a problem that I'm hoping someone can help me with. I have a web application written in VS.2003 and running on version 1.1 of the .NET Framework on XP pro and Windows server...
1
by: esource | last post by:
Hi all, has anyone been successful in forcing impersonation of the ASPNET account that calls a component through com interop? I have tried doing it programmatically, through IIS, through the web...
11
by: JCav | last post by:
I need to call a COM object from a remote machine using C#. I also need to pass on a different userID and password to the call. Has anyone done this? I've used Java to do this using JIntegra, but...
1
by: =?Utf-8?B?c3VidGlsZQ==?= | last post by:
Hi :-) I'm having some trouble with LDAP and Active Directory on Win2k3 I use Windows Authentication and the code System.Threading.Thread.CurrentPrincipal.Identity.Name gives me the correct...
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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.