Ask a Question related to ASP.NET Security, Design and Development.
-
form authetication?
Hi
Can anyone tell me which logon name (is NON "pre-Windows 2000" or the
"pre-Windows2000") is used for form authentication? Mine seems to work for
either one?! anyway to restrict that to just the NON "pre-Windows2000" one?
Also, I understand there is something called impersonation, can
impersonation be used with form authentication?
TIA
--
Guest
-
Tomcat HTTPS SSL Authetication (WITH SECURITYCONSTRAINT)
Hi all, I have a flex application which emedded into a page which is protected using container managed authentication The contraint look like... -
Problems with aspnet_wp getting authetication to remote machines
Please help me understand what is going on: I have a web server sitting in the DMZ. I have an app server sitting on the inside on the firewall.... -
SQL Authetication in windows service
how to configure .NET windows service to use windows authentication for SQL server -
ASP.NET windows authetication
Traditionally, I've used windows authentication with a web server on an Active directory domain. IIS authenticated users on AD. However to do... -
Forms Authetication to Protect Single File Using Asp.net
I want to protect a single file (openvideo.aspx). I already setup the folder as an application in IIS. The authentication seems to work fine and... -
Re: form authetication with LDAP on AD?
by the way, I am using form authentication with LDAP on AD.
<dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...one?> Hi
> Can anyone tell me which logon name (is NON "pre-Windows 2000" or the
> "pre-Windows2000") is used for form authentication? Mine seems to work for
> either one?! anyway to restrict that to just the NON "pre-Windows2000">
> Also, I understand there is something called impersonation, can
> impersonation be used with form authentication?
>
> TIA
>
> --
>
>
>
Guest
-
Joe Kaplan \(MVP - ADSI\) #3
Re: form authetication?
It depends on how you coded it.
Are you using a DirectoryEntry to bind to AD to authenticate the user? In
that case, the username syntax depends on the binding flags
(AuthenticationTypes) you specify.
The NT logon name (domain\user, where user is the sAMAccountName attribute
in AD) and the UserPrincipalName syntax (userPrincipalName attribute from
AD) will work in both simple and secure binds, so they are the most
flexible.
Joe K.
<dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...> Hi
> Can anyone tell me which logon name (is NON "pre-Windows 2000" or the
> "pre-Windows2000") is used for form authentication? Mine seems to work for
> either one?! anyway to restrict that to just the NON "pre-Windows2000"
> one?
>
> Also, I understand there is something called impersonation, can
> impersonation be used with form authentication?
>
> TIA
>
> --
>
>
>
Joe Kaplan \(MVP - ADSI\) Guest
-
Re: form authetication?
Hi Joe
Yes, I am using DirectoryEntry to bind but just to the NativeObject to force
authentication, I couldn't find any code sample showing with
AuthenticationType, is this the one that would imply which logon name to
use? Can you show me some code sample please?
Would it make any difference if I bind with NativeGUID?
By the way, thanks for your advise on my other thread.
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...for> It depends on how you coded it.
>
> Are you using a DirectoryEntry to bind to AD to authenticate the user? In
> that case, the username syntax depends on the binding flags
> (AuthenticationTypes) you specify.
>
> The NT logon name (domain\user, where user is the sAMAccountName attribute
> in AD) and the UserPrincipalName syntax (userPrincipalName attribute from
> AD) will work in both simple and secure binds, so they are the most
> flexible.
>
> Joe K.
>
> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...> > Hi
> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or the
> > "pre-Windows2000") is used for form authentication? Mine seems to workimpersonation be used with form authentication?> > either one?! anyway to restrict that to just the NON "pre-Windows2000"
> > one?
> >
> > Also, I understand there is something called impersonation, can> >> >
> > TIA
> >
> > --
> >
> >>> >
>
Guest
-
Joe Kaplan \(MVP - ADSI\) #5
Re: form authetication?
There are 4 possible username formats for an AD bind with DirectoryEntry
NT Account Name (domain\user)
userPrincipalName (user@domain.com, whatever is in the userPrincipalName
attribute)
plain username (whatever is in the sAMAccountName attribute)
distinguishedName
The first 2 can be used with any binding flags. The 3rd one can only be
used with AuthenticationTypes.Secure. The 4th one can only be used if
AuthenticationTypes.Secure is NOT specified.
I'd recommend you use AuthenticationTypes.Secure if you can, as it prevents
your credentials from going on the wire in plain text.
You can use NativeObject to force the bind. This is probably the fastest as
it doesn't load the property cache, so I'd recommend that.
HTH,
Joe K.
<dl> wrote in message news:%23giSc4nVFHA.2172@tk2msftngp13.phx.gbl...> Hi Joe
> Yes, I am using DirectoryEntry to bind but just to the NativeObject to
> force
> authentication, I couldn't find any code sample showing with
> AuthenticationType, is this the one that would imply which logon name to
> use? Can you show me some code sample please?
>
> Would it make any difference if I bind with NativeGUID?
>
> By the way, thanks for your advise on my other thread.
>
> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...> for>> It depends on how you coded it.
>>
>> Are you using a DirectoryEntry to bind to AD to authenticate the user?
>> In
>> that case, the username syntax depends on the binding flags
>> (AuthenticationTypes) you specify.
>>
>> The NT logon name (domain\user, where user is the sAMAccountName
>> attribute
>> in AD) and the UserPrincipalName syntax (userPrincipalName attribute from
>> AD) will work in both simple and secure binds, so they are the most
>> flexible.
>>
>> Joe K.
>>
>> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...>> > Hi
>> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or the
>> > "pre-Windows2000") is used for form authentication? Mine seems to work> impersonation be used with form authentication?>> > either one?! anyway to restrict that to just the NON "pre-Windows2000"
>> > one?
>> >
>> > Also, I understand there is something called impersonation, can> >>>> >
>> > TIA
>> >
>> > --
>> >
>> >>>>>> >
>>
>
Joe Kaplan \(MVP - ADSI\) Guest
-
Re: form authetication?
Hi Joe
I have been using the following lines of code to bind
DirectoryEntry entry = new DirectoryEntry(strpath, domain\user, pwd)
Object obj = entry.NativeObject
Do you mean I can change it to
DirectoryEntry entry = new DirectoryEntry(strpath, [email]user@domain.com[/email], pwd,
AuthenticationType.Secure)
Object obj = entry.NativeObject
?
TIA
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
in message news:OSR2F7vVFHA.2328@TK2MSFTNGP10.phx.gbl...prevents> There are 4 possible username formats for an AD bind with DirectoryEntry
> NT Account Name (domain\user)
> userPrincipalName (user@domain.com, whatever is in the userPrincipalName
> attribute)
> plain username (whatever is in the sAMAccountName attribute)
> distinguishedName
>
> The first 2 can be used with any binding flags. The 3rd one can only be
> used with AuthenticationTypes.Secure. The 4th one can only be used if
> AuthenticationTypes.Secure is NOT specified.
>
> I'd recommend you use AuthenticationTypes.Secure if you can, as itas> your credentials from going on the wire in plain text.
>
> You can use NativeObject to force the bind. This is probably the fastestwrote> it doesn't load the property cache, so I'd recommend that.
>
> HTH,
>
> Joe K.
>
> <dl> wrote in message news:%23giSc4nVFHA.2172@tk2msftngp13.phx.gbl...> > Hi Joe
> > Yes, I am using DirectoryEntry to bind but just to the NativeObject to
> > force
> > authentication, I couldn't find any code sample showing with
> > AuthenticationType, is this the one that would imply which logon name to
> > use? Can you show me some code sample please?
> >
> > Would it make any difference if I bind with NativeGUID?
> >
> > By the way, thanks for your advise on my other thread.
> >
> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>from> > in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...> >> It depends on how you coded it.
> >>
> >> Are you using a DirectoryEntry to bind to AD to authenticate the user?
> >> In
> >> that case, the username syntax depends on the binding flags
> >> (AuthenticationTypes) you specify.
> >>
> >> The NT logon name (domain\user, where user is the sAMAccountName
> >> attribute
> >> in AD) and the UserPrincipalName syntax (userPrincipalName attributework> >> AD) will work in both simple and secure binds, so they are the most
> >> flexible.
> >>
> >> Joe K.
> >>
> >> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...
> >> > Hi
> >> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or the
> >> > "pre-Windows2000") is used for form authentication? Mine seems to"pre-Windows2000"> > for> >> > either one?! anyway to restrict that to just the NON>> > impersonation be used with form authentication?> >> > one?
> >> >
> >> > Also, I understand there is something called impersonation, can> >> >> >> >
> >> > TIA
> >> >
> >> > --
> >> >
> >> >> >> >> >
> >>
> >>
> >
>
Guest
-
Re: form authetication?
Hi Joe
I just tried with the new syntax, it would still let me get by with either
userPrincipalName or the sAMAccountName. Does the path make any difference?
I have been using LDAP://dc=xxx, dc=com
TIA
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
in message news:OSR2F7vVFHA.2328@TK2MSFTNGP10.phx.gbl...prevents> There are 4 possible username formats for an AD bind with DirectoryEntry
> NT Account Name (domain\user)
> userPrincipalName (user@domain.com, whatever is in the userPrincipalName
> attribute)
> plain username (whatever is in the sAMAccountName attribute)
> distinguishedName
>
> The first 2 can be used with any binding flags. The 3rd one can only be
> used with AuthenticationTypes.Secure. The 4th one can only be used if
> AuthenticationTypes.Secure is NOT specified.
>
> I'd recommend you use AuthenticationTypes.Secure if you can, as itas> your credentials from going on the wire in plain text.
>
> You can use NativeObject to force the bind. This is probably the fastestwrote> it doesn't load the property cache, so I'd recommend that.
>
> HTH,
>
> Joe K.
>
> <dl> wrote in message news:%23giSc4nVFHA.2172@tk2msftngp13.phx.gbl...> > Hi Joe
> > Yes, I am using DirectoryEntry to bind but just to the NativeObject to
> > force
> > authentication, I couldn't find any code sample showing with
> > AuthenticationType, is this the one that would imply which logon name to
> > use? Can you show me some code sample please?
> >
> > Would it make any difference if I bind with NativeGUID?
> >
> > By the way, thanks for your advise on my other thread.
> >
> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>from> > in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...> >> It depends on how you coded it.
> >>
> >> Are you using a DirectoryEntry to bind to AD to authenticate the user?
> >> In
> >> that case, the username syntax depends on the binding flags
> >> (AuthenticationTypes) you specify.
> >>
> >> The NT logon name (domain\user, where user is the sAMAccountName
> >> attribute
> >> in AD) and the UserPrincipalName syntax (userPrincipalName attributework> >> AD) will work in both simple and secure binds, so they are the most
> >> flexible.
> >>
> >> Joe K.
> >>
> >> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...
> >> > Hi
> >> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or the
> >> > "pre-Windows2000") is used for form authentication? Mine seems to"pre-Windows2000"> > for> >> > either one?! anyway to restrict that to just the NON>> > impersonation be used with form authentication?> >> > one?
> >> >
> >> > Also, I understand there is something called impersonation, can> >> >> >> >
> >> > TIA
> >> >
> >> > --
> >> >
> >> >> >> >> >
> >>
> >>
> >
>
Guest
-
Joe Kaplan \(MVP - ADSI\) #8
Re: form authetication?
Yes, that is essentially it. AuthenticationTypes.Secure will use Kerberos
or NTLM to authenticate the user, then pass those credentials to AD via
LDAP.
You would want the entry.NativeObject in a try/catch block as well. And
don't forget to call Dispose in a Finally block on the DirectoryEntry object
to avoid memory leaks.
<dl> wrote in message news:uwUV0KwVFHA.3320@TK2MSFTNGP12.phx.gbl...> Hi Joe
> I have been using the following lines of code to bind
> DirectoryEntry entry = new DirectoryEntry(strpath, domain\user, pwd)
> Object obj = entry.NativeObject
>
> Do you mean I can change it to
> DirectoryEntry entry = new DirectoryEntry(strpath, [email]user@domain.com[/email], pwd,
> AuthenticationType.Secure)
> Object obj = entry.NativeObject
> ?
>
> TIA
>
> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> in message news:OSR2F7vVFHA.2328@TK2MSFTNGP10.phx.gbl...> prevents>> There are 4 possible username formats for an AD bind with DirectoryEntry
>> NT Account Name (domain\user)
>> userPrincipalName (user@domain.com, whatever is in the userPrincipalName
>> attribute)
>> plain username (whatever is in the sAMAccountName attribute)
>> distinguishedName
>>
>> The first 2 can be used with any binding flags. The 3rd one can only be
>> used with AuthenticationTypes.Secure. The 4th one can only be used if
>> AuthenticationTypes.Secure is NOT specified.
>>
>> I'd recommend you use AuthenticationTypes.Secure if you can, as it> as>> your credentials from going on the wire in plain text.
>>
>> You can use NativeObject to force the bind. This is probably the fastest> wrote>> it doesn't load the property cache, so I'd recommend that.
>>
>> HTH,
>>
>> Joe K.
>>
>> <dl> wrote in message news:%23giSc4nVFHA.2172@tk2msftngp13.phx.gbl...>> > Hi Joe
>> > Yes, I am using DirectoryEntry to bind but just to the NativeObject to
>> > force
>> > authentication, I couldn't find any code sample showing with
>> > AuthenticationType, is this the one that would imply which logon name
>> > to
>> > use? Can you show me some code sample please?
>> >
>> > Would it make any difference if I bind with NativeGUID?
>> >
>> > By the way, thanks for your advise on my other thread.
>> >
>> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>> from>> > in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...
>> >> It depends on how you coded it.
>> >>
>> >> Are you using a DirectoryEntry to bind to AD to authenticate the user?
>> >> In
>> >> that case, the username syntax depends on the binding flags
>> >> (AuthenticationTypes) you specify.
>> >>
>> >> The NT logon name (domain\user, where user is the sAMAccountName
>> >> attribute
>> >> in AD) and the UserPrincipalName syntax (userPrincipalName attribute> work>> >> AD) will work in both simple and secure binds, so they are the most
>> >> flexible.
>> >>
>> >> Joe K.
>> >>
>> >> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...
>> >> > Hi
>> >> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or
>> >> > the
>> >> > "pre-Windows2000") is used for form authentication? Mine seems to> "pre-Windows2000">> > for
>> >> > either one?! anyway to restrict that to just the NON>>>>> >> > one?
>> >> >
>> >> > Also, I understand there is something called impersonation, can> >
>> > impersonation be used with form authentication?
>> >> >
>> >> > TIA
>> >> >
>> >> > --
>> >> >
>> >> >
>> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>
Joe Kaplan \(MVP - ADSI\) Guest
-
Joe Kaplan \(MVP - ADSI\) #9
Re: form authetication?
It depends on what the error is. Generally, you don't need a path into the
directory to authenticate credentials. Just bind to rootDSE with the creds
you want to authenticate:
LDAP://rootDSE
Note however that if the current security context is a local machine account
(check WindowsIdentity.GetCurrent().Name), then you probably need to supply
a server or domain DNS name in your binding string as well:
LDAP://yourdomain.com/RootDSE
The "serverless" binding feature in ADSI/LDAP depends on the OS being able
to determine a domain controller from the identity of the current security
context, so if that is not a domain account, no domain will be found by
default.
HTH,
Joe K.
<dl> wrote in message news:%23RF40qwVFHA.2616@TK2MSFTNGP14.phx.gbl...> Hi Joe
> I just tried with the new syntax, it would still let me get by with either
> userPrincipalName or the sAMAccountName. Does the path make any
> difference?
> I have been using LDAP://dc=xxx, dc=com
>
> TIA
>
> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> in message news:OSR2F7vVFHA.2328@TK2MSFTNGP10.phx.gbl...> prevents>> There are 4 possible username formats for an AD bind with DirectoryEntry
>> NT Account Name (domain\user)
>> userPrincipalName (user@domain.com, whatever is in the userPrincipalName
>> attribute)
>> plain username (whatever is in the sAMAccountName attribute)
>> distinguishedName
>>
>> The first 2 can be used with any binding flags. The 3rd one can only be
>> used with AuthenticationTypes.Secure. The 4th one can only be used if
>> AuthenticationTypes.Secure is NOT specified.
>>
>> I'd recommend you use AuthenticationTypes.Secure if you can, as it> as>> your credentials from going on the wire in plain text.
>>
>> You can use NativeObject to force the bind. This is probably the fastest> wrote>> it doesn't load the property cache, so I'd recommend that.
>>
>> HTH,
>>
>> Joe K.
>>
>> <dl> wrote in message news:%23giSc4nVFHA.2172@tk2msftngp13.phx.gbl...>> > Hi Joe
>> > Yes, I am using DirectoryEntry to bind but just to the NativeObject to
>> > force
>> > authentication, I couldn't find any code sample showing with
>> > AuthenticationType, is this the one that would imply which logon name
>> > to
>> > use? Can you show me some code sample please?
>> >
>> > Would it make any difference if I bind with NativeGUID?
>> >
>> > By the way, thanks for your advise on my other thread.
>> >
>> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>> from>> > in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...
>> >> It depends on how you coded it.
>> >>
>> >> Are you using a DirectoryEntry to bind to AD to authenticate the user?
>> >> In
>> >> that case, the username syntax depends on the binding flags
>> >> (AuthenticationTypes) you specify.
>> >>
>> >> The NT logon name (domain\user, where user is the sAMAccountName
>> >> attribute
>> >> in AD) and the UserPrincipalName syntax (userPrincipalName attribute> work>> >> AD) will work in both simple and secure binds, so they are the most
>> >> flexible.
>> >>
>> >> Joe K.
>> >>
>> >> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...
>> >> > Hi
>> >> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or
>> >> > the
>> >> > "pre-Windows2000") is used for form authentication? Mine seems to> "pre-Windows2000">> > for
>> >> > either one?! anyway to restrict that to just the NON>>>>> >> > one?
>> >> >
>> >> > Also, I understand there is something called impersonation, can> >
>> > impersonation be used with form authentication?
>> >> >
>> >> > TIA
>> >> >
>> >> > --
>> >> >
>> >> >
>> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>
Joe Kaplan \(MVP - ADSI\) Guest
-
Re: form authetication?
Hi Joe
The problem is for a user account say "Bill Gates" with a UPN
"bgates@domain.com" and a sAMAccountName "billgates", I can login by typing
just bgates or billgates on the login page! Is it something to do with the
way I bind the DirectoryEntry? or just a configuration issue?
TIA
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
in message news:%233zDGIxVFHA.2560@TK2MSFTNGP10.phx.gbl...the> It depends on what the error is. Generally, you don't need a path intocreds> directory to authenticate credentials. Just bind to rootDSE with theaccount> you want to authenticate:
>
> LDAP://rootDSE
>
> Note however that if the current security context is a local machinesupply> (check WindowsIdentity.GetCurrent().Name), then you probably need toeither> a server or domain DNS name in your binding string as well:
>
> LDAP://yourdomain.com/RootDSE
>
> The "serverless" binding feature in ADSI/LDAP depends on the OS being able
> to determine a domain controller from the identity of the current security
> context, so if that is not a domain account, no domain will be found by
> default.
>
> HTH,
>
> Joe K.
> <dl> wrote in message news:%23RF40qwVFHA.2616@TK2MSFTNGP14.phx.gbl...> > Hi Joe
> > I just tried with the new syntax, it would still let me get by withwrote> > userPrincipalName or the sAMAccountName. Does the path make any
> > difference?
> > I have been using LDAP://dc=xxx, dc=com
> >
> > TIA
> >
> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>DirectoryEntry> > in message news:OSR2F7vVFHA.2328@TK2MSFTNGP10.phx.gbl...> >> There are 4 possible username formats for an AD bind withuserPrincipalName> >> NT Account Name (domain\user)
> >> userPrincipalName (user@domain.com, whatever is in thebe> >> attribute)
> >> plain username (whatever is in the sAMAccountName attribute)
> >> distinguishedName
> >>
> >> The first 2 can be used with any binding flags. The 3rd one can onlyfastest> > prevents> >> used with AuthenticationTypes.Secure. The 4th one can only be used if
> >> AuthenticationTypes.Secure is NOT specified.
> >>
> >> I'd recommend you use AuthenticationTypes.Secure if you can, as it> >> your credentials from going on the wire in plain text.
> >>
> >> You can use NativeObject to force the bind. This is probably theto> > as> >> it doesn't load the property cache, so I'd recommend that.
> >>
> >> HTH,
> >>
> >> Joe K.
> >>
> >> <dl> wrote in message news:%23giSc4nVFHA.2172@tk2msftngp13.phx.gbl...
> >> > Hi Joe
> >> > Yes, I am using DirectoryEntry to bind but just to the NativeObjectuser?> > wrote> >> > force
> >> > authentication, I couldn't find any code sample showing with
> >> > AuthenticationType, is this the one that would imply which logon name
> >> > to
> >> > use? Can you show me some code sample please?
> >> >
> >> > Would it make any difference if I bind with NativeGUID?
> >> >
> >> > By the way, thanks for your advise on my other thread.
> >> >
> >> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>> >> > in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...
> >> >> It depends on how you coded it.
> >> >>
> >> >> Are you using a DirectoryEntry to bind to AD to authenticate the>> > from> >> >> In
> >> >> that case, the username syntax depends on the binding flags
> >> >> (AuthenticationTypes) you specify.
> >> >>
> >> >> The NT logon name (domain\user, where user is the sAMAccountName
> >> >> attribute
> >> >> in AD) and the UserPrincipalName syntax (userPrincipalName attribute> > work> >> >> AD) will work in both simple and secure binds, so they are the most
> >> >> flexible.
> >> >>
> >> >> Joe K.
> >> >>
> >> >> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...
> >> >> > Hi
> >> >> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or
> >> >> > the
> >> >> > "pre-Windows2000") is used for form authentication? Mine seems to> > "pre-Windows2000"> >> > for
> >> >> > either one?! anyway to restrict that to just the NON> >> >> >> > one?
> >> >> >
> >> >> > Also, I understand there is something called impersonation, can> >
> >> > impersonation be used with form authentication?
> >> >> >
> >> >> > TIA
> >> >> >
> >> >> > --
> >> >> >
> >> >> >
> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
>
Guest
-
Joe Kaplan \(MVP - ADSI\) #11
Re: form authetication?
I would need to know more details to be sure and would need to see your
code. Can you show a dump of the user object from ldp.exe so I can see that
actual attribute values from AD? Also, if you can show your code, that
would be great. Essentially, what you are saying should not work unless we
are missing an important detail.
Joe K.
<dl> wrote in message news:OK3aZP7VFHA.4056@TK2MSFTNGP15.phx.gbl...> Hi Joe
> The problem is for a user account say "Bill Gates" with a UPN
> "bgates@domain.com" and a sAMAccountName "billgates", I can login by
> typing
> just bgates or billgates on the login page! Is it something to do with
> the
> way I bind the DirectoryEntry? or just a configuration issue?
>
> TIA
>
> "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
> in message news:%233zDGIxVFHA.2560@TK2MSFTNGP10.phx.gbl...> the>> It depends on what the error is. Generally, you don't need a path into> creds>> directory to authenticate credentials. Just bind to rootDSE with the> account>> you want to authenticate:
>>
>> LDAP://rootDSE
>>
>> Note however that if the current security context is a local machine> supply>> (check WindowsIdentity.GetCurrent().Name), then you probably need to> either>> a server or domain DNS name in your binding string as well:
>>
>> LDAP://yourdomain.com/RootDSE
>>
>> The "serverless" binding feature in ADSI/LDAP depends on the OS being
>> able
>> to determine a domain controller from the identity of the current
>> security
>> context, so if that is not a domain account, no domain will be found by
>> default.
>>
>> HTH,
>>
>> Joe K.
>> <dl> wrote in message news:%23RF40qwVFHA.2616@TK2MSFTNGP14.phx.gbl...>> > Hi Joe
>> > I just tried with the new syntax, it would still let me get by with> wrote>> > userPrincipalName or the sAMAccountName. Does the path make any
>> > difference?
>> > I have been using LDAP://dc=xxx, dc=com
>> >
>> > TIA
>> >
>> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>> DirectoryEntry>> > in message news:OSR2F7vVFHA.2328@TK2MSFTNGP10.phx.gbl...
>> >> There are 4 possible username formats for an AD bind with> userPrincipalName>> >> NT Account Name (domain\user)
>> >> userPrincipalName (user@domain.com, whatever is in the> be>> >> attribute)
>> >> plain username (whatever is in the sAMAccountName attribute)
>> >> distinguishedName
>> >>
>> >> The first 2 can be used with any binding flags. The 3rd one can only> fastest>> >> used with AuthenticationTypes.Secure. The 4th one can only be used if
>> >> AuthenticationTypes.Secure is NOT specified.
>> >>
>> >> I'd recommend you use AuthenticationTypes.Secure if you can, as it
>> > prevents
>> >> your credentials from going on the wire in plain text.
>> >>
>> >> You can use NativeObject to force the bind. This is probably the> to>> > as
>> >> it doesn't load the property cache, so I'd recommend that.
>> >>
>> >> HTH,
>> >>
>> >> Joe K.
>> >>
>> >> <dl> wrote in message news:%23giSc4nVFHA.2172@tk2msftngp13.phx.gbl...
>> >> > Hi Joe
>> >> > Yes, I am using DirectoryEntry to bind but just to the NativeObject> user?>> >> > force
>> >> > authentication, I couldn't find any code sample showing with
>> >> > AuthenticationType, is this the one that would imply which logon
>> >> > name
>> >> > to
>> >> > use? Can you show me some code sample please?
>> >> >
>> >> > Would it make any difference if I bind with NativeGUID?
>> >> >
>> >> > By the way, thanks for your advise on my other thread.
>> >> >
>> >> > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com>
>> > wrote
>> >> > in message news:eS3YKwlVFHA.3140@TK2MSFTNGP14.phx.gbl...
>> >> >> It depends on how you coded it.
>> >> >>
>> >> >> Are you using a DirectoryEntry to bind to AD to authenticate the>>>>> >> >> In
>> >> >> that case, the username syntax depends on the binding flags
>> >> >> (AuthenticationTypes) you specify.
>> >> >>
>> >> >> The NT logon name (domain\user, where user is the sAMAccountName
>> >> >> attribute
>> >> >> in AD) and the UserPrincipalName syntax (userPrincipalName
>> >> >> attribute
>> > from
>> >> >> AD) will work in both simple and secure binds, so they are the most
>> >> >> flexible.
>> >> >>
>> >> >> Joe K.
>> >> >>
>> >> >> <dl> wrote in message news:uPexJagVFHA.4028@TK2MSFTNGP10.phx.gbl...
>> >> >> > Hi
>> >> >> > Can anyone tell me which logon name (is NON "pre-Windows 2000" or
>> >> >> > the
>> >> >> > "pre-Windows2000") is used for form authentication? Mine seems to
>> > work
>> >> > for
>> >> >> > either one?! anyway to restrict that to just the NON
>> > "pre-Windows2000"
>> >> >> > one?
>> >> >> >
>> >> >> > Also, I understand there is something called impersonation, can>
>> >> >> > >
>> >> > impersonation be used with form authentication?
>> >> >> >
>> >> >> > TIA
>> >> >> >
>> >> >> > --
>> >> >> >
>> >> >> >
>> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>
Joe Kaplan \(MVP - ADSI\) Guest



Reply With Quote

