Re: Windows authentication in code



Typically, when you do authentication in code like this, you do it as part
of a forms authentication implementation. Essentially, if you don't want to
do Windows auth with IIS, the browser needs an alternate mechanism like a
cookie (which is what forms auth uses) to reauthenticate on each request.

Why are you doing this though? Why not just use Windows auth?

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Jerry C" <jerryed@xxxxxxxxxxxxx> wrote in message
news:B6B20A59-A4A7-4B8A-9965-A963DE8DC843@xxxxxxxxxxxxxxxx
I am trying to login a user to NT on a default.aspx page when the site is
setup to anonymous. I used some code for impersonation and it works for
the
default page but when I redirect to other pages I am back to the anonymous
user for IIS6. How can I get the new impersonated user to be the user for
the
session just as if he was logged on by integrated windows authentication.
It
may be that impersonation is not the way to go. Some code examples may
help
In a post:
Subject: Unable to establish secure connection with the server 6/13/2006
6:19 AM PST

Luke Zhang wrote.
How about this: you may have a main "entry" form, user can select his
source by himself, for example, he can select if he is a user with
companion account, or a AD user which need to be authenticated with form.
If user select "companion account", you may redirect him to a windows
authentication webform. For others, redirect him to a login form.


The windows authentication webform may be the answer. Are there some
examples on how to do this in code so the token or whatever it is called
is
passed around to the other pages. I am a little light on This subject.
Thanks
--
Jerry


.



Relevant Pages

  • Re: Remote control of windows service with windows 2003 server
    ... Impersonation is more difficult in forms authentication. ... you are passing the username and password for a windows account. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Passing form credentials to windows security
    ... I am also having troubles getting customauth to redirect to a specified logon ... However, the custom scheme you describe (try Windows first and if it fails, ... the standardized browsers and the authentication protocols just don't ... You can configure two websites, one Intranet that is Windows only, the other ...
    (microsoft.public.inetserver.iis.security)
  • Re: Accessing shares on other servers
    ... > You may be using Windows Authentication, ... > under the security context of the person who is using it. ... > Read more about impersonation on MSDN: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Remote control of windows service with windows 2003 server
    ... I think that I could also use Windows Authentication instead of Web Form ... > Impersonation is more difficult in forms authentication. ... >>2) Are there any relationship between Windows password of a Windows User ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Change in ASP.Net authentication between Win2000 and Win2003
    ... > is turning on/off Kerberos is occuring. ... It control how IE deals with "Authentication: ... when you put IIS6 in a domain and have "Integrated Windows Authentication" ...
    (microsoft.public.windows.server.security)