Re: Using login alias in Membership Provider



no you can't. That's why i said in the first place that this is an unsupported scenario..

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

This is a great idea and seems like it would work if I were writing
the ASP.NET app, but I am just writing the provider. Can I reasonably
expect other apps to do this? In particular, will SharePoint 2007
apply this logic?

"Dominick Baier" <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:4580be63199eb8c8c813b4c2f93f@xxxxxxxxxxxxxxxxxxxxx

What you can do is to set the cookie manually, e.g.

if (Membership.ValidateUser(shortname, password)

MembershipUser user = Membership.GetUser(shortname)
FormsAuthentication.RedirectFromLoginPage(user.Username)

or with the Login control (control is called _login):

protected void _login_Authenticate(object sender,
AuthenticateEventArgs e)
{
if (Membership.ValidateUser(_login.UserName, _login.Password)
{
MembershipUser user = Membership.GetUser(_login.UserName);
_login.UserName = user.UserName;
e.Authenticated = true;
}
}
---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com
No, I am implementing my own membership provider for a fifferent
directory. Here again is my original questtion:

In implementing an ASP.NET Membership Provider, we can not figure
out how to supply the real user name (used in access control
settings, etc.) when users log in using just the short name.

"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:yPDPR6b%23GHA.4432@xxxxxxxxxxxxxxxxxxxxxxxx

Thanks for your reply Stephen,

So are you using the AD membership provider currently? If so, AD
membership
provider only allow us to authenticate user in a single format
only.
If
you're not authenticate user through AD membership provider, are
you
using
custom provider or a extended membership provider derived from AD
memberhip
provider? As you said that
"Users have only one name ("John Smith/Acme") and that is the only
name that is ever used in access control lists, role membership
lists, etc."
Then, you should always use this name as the username to validate
through membership provider. In other words, you can not make the
membership provider know both "John Smith/Acme" and
"jsmith@xxxxxxxx", you must determine which schema to use. At least
the current built-in ActiveDirectory membership provider require
this.

Also, as for the ACL(Access Control List) you mentioned, are they
normal NTFS file ACL or AD object ACL? How will you use them in
your application?

If convenient, you can provide the membership & role manager
specific configuration in your application's web.config so that we
can get a clear view of it.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.



.



Relevant Pages

  • Re: CreateUserWizard Control
    ... The tables created by the Membership Provider are not meant to be extended. ... you can adds more steps to collect this additional data then handle the CreateUserWizard.CreatingUser or CreateUserWizard.CreatedUser events to save the extra data to the Profile. ... I am using the CreateUserWizard Control of ASP.NET 2.0 for user ... and also how can i save that data to mysql database instead of Access. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Question about ChangePassword control
    ... >I use in ChangePassword web control. ... >Membership provider that I also has defined. ... A minimum password length of 3 would not be advisable. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Question about ChangePassword control
    ... >>I use in ChangePassword web control. ... >>Membership provider that I also has defined. ... A minimum password length of 3 would not be advisable. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Using login alias in Membership Provider
    ... ASP.NET app, but I am just writing the provider. ... or with the Login control: ... So are you using the AD membership provider currently? ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Question about ChangePassword control
    ... I use in ChangePassword web control. ... Membership provider that I also has defined. ... input and change password of any length. ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast