Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2004

Tip: Looking for answers? Try searching our database.

Impersonation in a console (or Windows) app

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
headdeball - 30 Aug 2004 18:06 GMT
Hi,
I have googled around and searched hell and high water for this but does
anyone know how to set up impersonation in a console app (or a windows
app). I am used to ASP.NET and have traditionally used the web.config file
like this

<configuration>
    <system.web>
        <authentication mode="windows" />
        <identity impersonate="true" />
    </system.web>
</configuration>

But this doesn't work for my app as obviously system.web is meaningless.
So what do I use instead?

Regards,
hdb
Alvin Bruney [MVP] - 30 Aug 2004 18:34 GMT
why don't you setup a user account with the correct permissions and
impersonate to the account. You really should impersonate thru code and not
blindly thru the webconfig file since the entire application runs under the
impersonated account.

Signature

Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok

> Hi,
> I have googled around and searched hell and high water for this but does
[quoted text clipped - 14 lines]
> Regards,
> hdb
headdeball - 31 Aug 2004 11:31 GMT
Thanks Alvin,
It was just for a small app quick app and I wanted to try out the concept.
A friend of mine just came across the following links this morning which
use code inpersonation (that works on XP only). Not quite
the answer to my problem but it will do for now

http://blogs.ssw.com.au/andrewweaver/articles/186.aspx

http://blogs.ssw.com.au/andrewweaver/articles/186.aspx

Thanks again,
hdb

> why don't you setup a user account with the correct permissions and
> impersonate to the account. You really should impersonate thru code and not
> blindly thru the webconfig file since the entire application runs under the
> impersonated account.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.