How can I have Forms based auth and Basic Auth on same server?

trend

Centurion
Joined
Oct 12, 2004
Messages
171
Hello, I am developing this website to have 2 ways to login.

The first way is a normal Forms based login.

And the 2nd way is Basic Authentication... I have a subdir and file that a user goes to.. lets say /subdir/login.html. And once the user enters in his credentials, I want him to be redirected to /mainpage.html

I am using this code for both logins:
Visual Basic:
                        FormsAuthentication.RedirectFromLoginPage("CookieMonster", False)
                        httpApplication.Response.Redirect("/mainpage.html")

But, after the user authenticates via basic authentication, he is redirected to the /mainpage.html and for some reason then redirected to the forms based authentication menu.

Why is this?

And how can I fix it?


thanks Lee
 
Well.. can you have authentication on a subdir and it allow the user to be authenticated on the root dir?

Example:

user authenticates at /subdir/login.aspx
and then it redirects him to /main.aspx


(if the user doesn't authenticate via /subdir/login.aspx and tries to go to /main.aspx, he will be outputed at /login.aspx )


thanks
Lee
 
Back
Top