Windows and Forms Authentication at the same time ???

  • Thread starter Thread starter cmrchs
  • Start date Start date
C

cmrchs

Hi,

I am trying to create a site that will be used by both employees AND external users, so both types of users are trying to access the same pages.

In the case of an employee on the intranet,
authentication needs to occur via Windows integrated authentication.
If the user is NOT on the intranet (external user), the user needs to be sent to a Forms login page.

How does one implement this ?

thanks
Chris


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
What you can do is enable Forms authentication for the intranet and the
extranet users. You can then use the LogonUser() method of the advapi32.dll
in the load of your login page. With an If-statement you can check wether
LogonUser() returns true and redirect the user to the page he/she came from.
When the LogonUser() returns false you do nothing so he/she stays on the
login page and needs to authenticate before continuing.

Gabriel Lozano-Morán
 
Back
Top