Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Override Windows auth using global.asax?

Reply
Thread Tools

Override Windows auth using global.asax?

 
 
gbrowins@gmail.com
Guest
Posts: n/a
 
      06-29-2010
Here's my environment
Win2003 Standard SP2, IIS 6.0, MOSS 2007, .NET 2.0.50727

IIS website uses MOSS 2007 "Team Site" template and has only IWA
enabled. Web.config has Windows auth w/ Impersonation:
<authentication mode="Windows" />
<identity impersonate="true" />

IE HTTP headers shows that NTLM authentication occurs for workstation
user. In global.asax, I've defined
WindowsAuthentication_OnAuthenticate() and can see incoming the
Principal/Identity values as:
WindowsAuthenticationEventArgs.Identity.Name = ACME\testuser
WindowsAuthenticationEventArgs.Identity.Authentica tionType =
Negotiate
HttpContext.User.Identity = null
Thread.CurrentPrincipal.Identity = <blank>

I'm using the KerbS4U extension to create a new WindowsIdentity which
is then used to create a WindowsPrincipal for the new/overriding user:
WindowsIdentity winid = new WindowsIdentity("(E-Mail Removed)");
WindowsPrincipal princ = new WindowsPrincipal(winid);

These succeed and I set the new principal to HttpContext.Current.User
& Thread.CurrentPrincipal without errors. I've defined both
Application_AuthenticateRequest() and
Application_PostAuthenticateRequest() functions in global.asax. These
show the "new" Identity in the HttpContext.Current.User &
Thread.CurrentPrincipal, but the "Welcome <DOMAIN\username>" in the
upper-right menu of the default.aspx homepage itself still shows the
name from the initial IWA!

Does anyone have any ideas about where this is breaking down?

-Gregg
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Override Windows auth using global.asax? gbrowins ASP .Net 0 06-28-2010 05:20 PM
windows auth and forms auth Smokey Grindle ASP .Net 1 06-08-2006 03:14 PM
How to log out of asp.net app using Windows Auth NOT Forms Auth Ed Staffin ASP .Net Security 1 04-17-2006 09:22 AM
Windows Auth, but Forms Auth for one page? =?Utf-8?B?ZGhucml2ZXJzaWRl?= ASP .Net 1 01-08-2005 05:50 PM
Configuring Windows Auth & Forms Auth in Asp.Net =?Utf-8?B?Q2hyaXMgTW9oYW4=?= ASP .Net 0 04-28-2004 06:11 PM



Advertisments