Forms / Windows Authentication

Posts   
 
    
Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 22-Aug-2007 18:41:07   

Hi all,

I currently have a web app that uses forms authentication.

What I want to do is create in additional way to authenticate if they come into the application differently.

This is what it would look like:

www.medford.com/PAL/Default.aspx?Type=Student --- Use Windows Authentication --- Redirect to Default.aspx

www.medford.com/PAL/Default.aspx?Type=Parent --- Use Forms Authentication --- Redirect to Default.aspx

Also, instead of Windows Authetication, I would like to display a form that looks something like the Outlook Web Application (OWA) logon form.

Thanks for any thoughts on this.

Fishy

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 27-Aug-2007 19:32:07   

Well, I got no responses cry

But I do have a solution. I'll just keep using Forms Authentication but I'll use the following to authenticate a student:

            Dim dirEntry As New DirectoryEntry("LDAP://student.internal", txtUserName.Text & "@student", txtPassword.Text)

            Try
                Dim nat As Object = dirEntry.NativeObject
            Catch ex As Exception
                lblWarning.Text = "Invalid Sign In... Please Re-Enter!"
                Call SetInitialFocus(txtPassword)
                lblWarning.Visible = True
                Exit Sub

            End Try

I don't really like using a Try-Catch for validation flushed but it works.