tailieunhanh - Professional ASP.NET 2.0 Security, Membership, and Role Management phần 9

Tuy nhiên, tính năng mẫu được hiển thị trước đây thay vì dựa trên khung để làm các việc nâng nặng. Bởi vì khởi tạo được gọi là từ các nhà xây dựng tĩnh, khung sẽ nhớ rằng các nhà xây dựng tĩnh không. Điều này có nghĩa là nếu phương pháp khởi tạo không thành công, nỗ lực tiếp theo để gọi các thuộc tính công cộng | ActiveDirectoryMembershipProvider With this configuration the provider expects that any usernames passed to its methods will be just the username portion of the NT4-style DOMAIN USERNAME format. For example the following code retrieves the user object for CORSAIR demouser Membershipuser mu demouser Notice how the username parameter doesn t include the domain identifier. This is important because if you attempt to pass full NT4-style usernames to the provider the calls will never return anything that is if you pass DOMAIN USERNAME the provider is literally looking for a user object whose SAM account name is DOMAIN USERNAME . Because the provider already knows the domain within which it is operating it does not need the domain portion of the username. Remember that the provider is effectively acting like a database provider except that the database is really an LDAP server. When the provider looks for objects using a SAM account name it is performing an LDAP search where the sAMAccountName attribute on the directory s user object equals a specific value. As a result you only need to supply the username. If you happen to set up ActiveDirectoryMembershipProvider and you are unable to retrieve any existing users keep in mind the attributeMapUsername attribute. It is likely that if the connection string works and you are getting back nulls from methods like GetUser that your directory users have been configured only with SAM account names and not UPNs. Switching attributeMapUsername over to sAMAccountName is probably the most common configuration step that developers need to make to get the provider working with their directory. However if you have been creating user accounts in the directory using the ActiveDirectoryMembershipProvider with its default setting of UPN-style usernames you may run into a different problem. When you create users in the Active Directory Users and Computers MMC the UI conveniently auto-selects a domain suffix for your UPN. .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.