HighTechTalks DotNet Forums  

Set Windows Principal

ASP.net Security microsoft.public.dotnet.framework.aspnet.security


Discuss Set Windows Principal in the ASP.net Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Dadi
 
Posts: n/a

Default Set Windows Principal - 09-09-2003 , 10:53 AM






Hi,

My current legacy asp/becoming-asp.net application uses IIS Windows
Authentication at present. What I need to do is let a user coming from
another site enter mine without being asked to log in. My first stab at this
is to create a page named LoginService.aspx that expects a username and
password in a posted form. It should then log the user in using the
LogonUser API from advapi32 and replace the Principal object for the thread
using Thread.CurrentPrincipal. I have coded this but it doesn´t seem to work
properly!

1) How do I suppress the Windows dialog box when accessing
LoginService.aspx? Keep it in another vroot?

2) If the user must, through his use of the site, access an OLAP server that
requires Windows authentication would the OLAP server not see the Windows
Principal I replaced for the Thread?

Regards,
Dadi.

ps. The code I use in Page_Load:

// call LogonUser and get a token
WindowsIdentity identity = new WindowsIdentity(token);

Thread.CurrentPrincipal = new WindowsPrincipal(identity);

// redirect to a page that accesses an OLAP server.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.