Login control logs in, but user does not stay logged in.

Posted on 2007-10-04
Last Modified: 2013-11-07
I have a VS2005 ASP.NET Login control that I am using. I log in using the control, it redirects me to a page within the following folder...

<location path="secure/forms">
                        <allow roles="Director, Manager, Supervisor, Superintendent, Admin"/>
                        <deny users="?"/>

The user I am logging in with has the roles "Director, Admin, User". When the login control redirects me to the page, the page redirects me to the login page, and the login view says I am not logged in. Any ideas on how I can make the user stay logged in after logging in?
Question by:addicktz
    LVL 20

    Accepted Solution

    Do you call the setAuthCookie if you are using Cookies

    FormsAuthentication.SetAuthCookie(string username,bool createPersistentCookie)

    LVL 1

    Author Comment

    I tried SetAuthCookie, and I get the same results =[
    LVL 1

    Author Comment

    Membership.Validate(Logincontrol.username, Logincontrol.password) returns true, but the user doesnt seem to really ever be logged in, Any ideas why it wouldn't work, or a work around would be greatly appreciated it.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now