-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: thajeer
Message 2 in Discussion



Hi Anil,

        If
the group is in your machine ( not in domain ) give the name as MachineName\GroupName
else give it as Domain\GroupName

Try this

         
  ' Create a
WindowsIdentity object for the current user 

         
  ' using the
GetCurrent method 



         
  idWindows = WindowsIdentity.GetCurrent()



         
  ' Create a
WindowsPrincipal object based

         
  ' on the WindowsIdentity
object. The WindowsPrincipal

         
  ' object contains
the current user's Group membership.

         
  prinWindows = New
WindowsPrincipal(idWindows)



         
  'Check the
name and see if the user is authenticated. and the membership in the Activemon
Adminstrator group

         
  strUser = "MachineName\GroupName"

         
  If
prinWindows.Identity.IsAuthenticated And
prinWindows.IsInRole(strUser) Then

         
      '
The user has access

         
  Else

         
      '
Elss not

         
  End
If





Hope this helps .. do let me know incase
any clarifications 



Cheers!!



Thajeer Thundiyil










"GeeksPKD" <[EMAIL PROTECTED]>


05/18/2004 09:35 AM





Please respond to

"BDOTNET" <[EMAIL PROTECTED]>






To
<[EMAIL PROTECTED]>


cc



Subject
getting domains after authenticating

















New Message on BDOTNET





getting
domains after authenticating 





Reply





 
Reply
to Sender   Recommend


Message 1 in Discussion







From:
GeeksPKD




HI 

I have a web app(asp.net).I have authenticated the logged in user by using
( Imports.System.Security.Principa) and now i am trying to find wether
the logged in user is in a role(say Finance Dept).

There is a function named isrole but that is giving me only predefined
roles.pls provide solution 

thanks

Anil





View
other groups in this category. 






Also on MSN:

Start
Chatting |
Listen
to Music |
House
& Home |
Try
Online Dating |
Daily
Horoscopes 









To stop getting this e-mail, or change how often it arrives, go to your
E-mail
Settings. 



Need help? If you've forgotten your password, please go to Passport
Member Services. 

For other questions or feedback, go to our Contact
Us page. 



If you do not want to receive future e-mail from this MSN group, or if
you received this message by mistake, please click the "Remove"
link below. On the pre-addressed e-mail message that opens, simply click
"Send". Your e-mail address will be deleted from this group's
mailing list. 

Remove
my e-mail address from BDOTNET.




ForwardSourceID:NT00005856
   



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to