how to obtain the login id and domain in c#.asp

S

Steve

I am using c#.asp to write an application in which I need to get the login id
and domain of the user and verify his/her privileges to use such functions or
actions. Can someone show me an example code? Thanks a lot.
 
J

Joe Kaplan \(MVP - ADSI\)

How are you authenticating the user? If you are using Windows
authentication in IIS, the user info will be available in the Context.User
property. You can get the name and domain from the Identity.Name property
and verify Windows group membership with the IsInRole method.

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top