Re: Implementing my own Windows Authentication module.

From: Brad (bh_10_2000@yahoo.com)
Date: 02/17/03


From: "Brad" <bh_10_2000@yahoo.com>
Date: Mon, 17 Feb 2003 10:45:49 -0600


I'm trying to figure out what the "app" is referring to in the code below.
Anybody got an ideal?

"Anthony K. Song" <aksong@yahoo.com> wrote in message
news:Os$zISmpCHA.1628@TK2MSFTNGP12...
> You're gonna like this one....
>
> try this in your custom authentication module:
>
> IntPtr userToken =
>
((HttpWorkerRequest)((IServiceProvider)app.Context).GetService(typeof(HttpWo
> rkerRequest))).GetUserToken();
>
> WindowsIdentity winIdentity = new WindowsIdentity(userToken);
>
> and there you have your windows authenticated user.
>
>
>
> "Arnaud PICHERY" <aranud@ifrance.com> wrote in message
> news:#BKM625fCHA.1848@tkmsftngp10...
> > Hi !
> >
> > I need to create my own authentication module to
> > handle both the Form authentication and the Windows
> > authentication (Users without the proper windows
> > credentials will be redirected to a logon page and
> > will have to enter some alternate credentials using
> > a login/password validated by a form-like authentication
> > mechanism).
> >
> > So far I have been able to create the form authentication
> > part without too much troubles, but the windows
> > authentication part is a little more tricky.
> >
> > Basically what I miss is the user token found in the
> > request to create a WindowsIdentity object. I know that
> > the Windows authentication module provided by microsoft
> > does that by accessing an internal HttpWorkerRequest
> > object and getting the user token by calling
> > HttpWorkerRequest.GetUserToken(). Unfortunately I can
> > access the internal HttpWorkerRequest object.
> >
> > Any idea on how to get it?
> >
> > Arnaud :O)
> >
> > PS: I have a working version of my work at
> > http://pichery.dyndns.org/aspnet using the provided
> > Windows authentication mechanism and overloading it
> > with the form authentication mechanism. But I need to
> > wrap the whole into a IHttpModule and thus using the
> > provided Windows authentication mechanism is not an option.
> >
> >
> >
> >
>
>



Relevant Pages

  • 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)
  • 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.inetserver.iis.security)
  • Re: Need help configuring Wireless Connection profile
    ... and I can only use the intel OR windows utility, not both at the same time. ... Windows authentication for all users,4129,LRG\ryanv,4149,Wireless WPA2 ... SMALL BUSINESS SERVER: ... STEP #1 Install Certificate Services ...
    (microsoft.public.windowsxp.general)
  • RE: Beginners Questions
    ... We do use Windows form on the presentation layer which is on ... terminal server and call web services on the business logic side. ... of using "proxy" authentication on SQL Server. ... > I have written an app with a Windows Forms UI that is deployed to clients ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: form authentication and webservices
    ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... We will be using Windows Authentication on the Web Services side (same ... Dominick Baier ...
    (microsoft.public.dotnet.framework.aspnet.security)