troubleshooting Question

Forms Authentication doesn't work

Avatar of marchillino
marchillino asked on
ASP.NET
1 Comment1 Solution224 ViewsLast Modified:
Hi all,
I use forms authentication, but when i try to open any page(not the login page)  and the cookie isn't exist yet, it opens normally, i think it should be redirected to the login page.
here is my configuration in web.config(the login page path is correct):
<authentication mode="Forms">
   <forms name="TESTAUTH" loginUrl="Login.aspx"
            protection="All" timeout="120" path="/"
            requireSSL="false" slidingExpiration="false">
    </forms>
</authentication>
<authorization>
        <allow users="*" />
        <deny users="?"/>
    </authorization>
and in the login page, i check the username/password then if it is correct, i call: FormsAuthentication.RedirectFromLoginPage(username,true);

So what i miss here guys to make the page redirected to the login page.

Thanks a lot,
Michael Lahzy
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros