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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top