RE: ActiveDirectory and user page Access



Thanks for your reply, Alex.

Here are my answers:

(1)What does the CN=Users,DC=testdomain1,DC=tes
t,DC=com" mean and do I have to use these attributes
This is the DistinguishedName in ADsPath. It is required if Kerberos
authentication is required in your AD. This is detailed documented at
http://msdn.microsoft.com/en-us/library/aa746384.aspx. You'd better to use
it, because it works in any case of authentication.

(2)Is Is it possible to use text box controls instead of the login
controls
and still user the membership class
The answer is yes. Please use "Membership.ValidateUser(userName.Text,
password.Text)" to do authentication.
Here is sample code for doing the same job with
ActiveDirectoryMembershipProvider. Please follow the "Using the
ActiveDirectoryMembershipProvider" section:
http://msdn.microsoft.com/en-us/library/ms998347.aspx#paght000022_usingtheac
tivedirectorymembershipprovider

(3) Can you give a line of line that will validate the group or role that
the logged in user belongs to. It appears to be similar to validate user
syntax but I am not sure.
Do you mean you want the sample code of validate the group or role that the
logged in user belongs to?
Usually, we use the method: "Roles.IsUserInRole(userName, roleName)" to do
it, which gets a value indicating whether the specified user is in the
specified role. It is documented at
http://msdn.microsoft.com/en-us/library/bz1zy88e.aspx.
Another method is "Roles.GetRolesForUser(userName)", which gets a list of
the roles that a user is in. It is documented at
http://msdn.microsoft.com/en-us/library/8h930x07.aspx.
Another alternative is "User.IsInRole(roleName)". The User is from
System.Web.HttpContext.Current.User. It is documented at
http://msdn.microsoft.com/en-us/library/system.security.principal.iprincipal
..isinrole.aspx.

The roles and groups can be provided by SqlRoleProvider, or
WindowsTokenRoleProvider. That depends on your configuration in web.config.
Again, for SqlRoleProvider, the best sample I ever found is the
step-by-step instruction in Scott Gu's blog in my initial reply.
For WindowsTokenRoleProvider, similiar to SqlRoleProvider. The sample
configuration code is at
http://msdn.microsoft.com/en-us/library/system.web.security.windowstokenrole
provider.aspx.

We understand that there are so many concepts and configurations that you
need to know when implementing this feature. So please feel free to let us
know your questions and it is always our pleasure to work them with you.

Have a nice day!

Regards,
Hongye Sun (hongyes@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
 
This posting is provided "AS IS" with no warranties, and confers no rights.








.



Relevant Pages

  • RE: ActiveDirectory and user page Access
    ... like for the role management I found this link: ... Do you mean you want the sample code of validate the group or role that the ... That depends on your configuration in web.config. ... Again, for SqlRoleProvider, the best sample I ever found is the ...
    (microsoft.public.vsnet.general)
  • Solaris Security Summary
    ... Administering Security on the Solaris OE ... Configuration control, facility management, and system ... Authentication: The ability to prove who you are. ...
    (comp.unix.solaris)
  • Re: POP3 Security & SMTP Authentication
    ... configuration of Exchange 2003 will require a userid/password to collect ... setup a second SMTP virtual server that only accepts Basic Authentication ... > 2) all clients send/receive external email using outlook via an external ...
    (microsoft.public.exchange2000.general)
  • Re: CUPS printer error for Canon BJC-250
    ... The configuration through gnome-cups-manager is finished, ... from the terminal window) I get erros like 'authentication ... failure' althought the root password is properly entered and the ... One of the nice things about GNU/Linux is that you do not need to reboot the PC after an installation or configuration change. ...
    (Debian-User)
  • Re: Basic Authentication fails with Error 401.2 where Integrated succe
    ... directory that is protected by Basic Authentication. ... The directory is configured in IIS with only Basic Authentication checked ... the integrated authentication box in the IIS security configuration, ...
    (microsoft.public.inetserver.iis.security)

Loading