Can not login and there is no error message!

Last post 07-04-2009 12:41 AM by melih. 4 replies.

Sort Posts:

  • Can not login and there is no error message!

    07-03-2009, 8:10 PM
    • Member
      2 point Member
    • melih
    • Member since 03-22-2007, 11:18 AM
    • Posts 6

    Hi there,

    I have just set up membership and role providers for my asp.net site.

    ASP.NET configuration tool is working fine. I can create users, roles and access rules. However my login page does not login.

    it does redirect me to the page I clicked login link when I hit login button but I am not really logged in. Login status control still shows "login" and LoginName control shows nothing. When I try to enter wrong password it warns me about it but no further luck...

    Any idea how to troubleshoot this?

    Thanks in advance.

    Melih
  • Re: Can not login and there is no error message!

    07-03-2009, 11:15 PM
    • Member
      650 point Member
    • Bobby-Z
    • Member since 10-04-2008, 5:53 AM
    • Orange County, CA
    • Posts 297

     You do have the log-in control I am assuming on the page? I know it is a dumb question.

     

    Now also do you have a LoginView Control? a LoginStatus Control and a LoginName Control

     

    You need to have it set up something like this

    <asp:LogInView runat="server" id=LoginView1">
    <anonymousTemplate>
         You Are Not logged in! 
    </anonymousTemplate>
    <LoggedinTemplate>
                   <asp:LoginName ID="LoginName" runat="server" />
                   <asp:LoginStatus ID="LoginStatus" runat="server" />
    </LoggedinTemplate>
    </asp:LogInView>

    Or you can display based upon roles

     

    <asp:LogInView runat="server" id=LoginView1">
    <anonymousTemplate>
         You Are Not logged in! 
    </anonymousTemplate>
    <RoleGroups>
         <RoleGroup Roles="Role1" >
              <contenttemplate>  
                   <asp:LoginName ID="LoginName" runat="server" />
                   <asp:LoginStatus ID="LoginStatus" runat="server" />
                   You are in Role 1
              </contenttemplate>
         </RoleGroup>
         <RoleGroup Roles="Role2" >
              <contenttemplate>  
                   <asp:LoginName ID="LoginName" runat="server" />
                   <asp:LoginStatus ID="LoginStatus" runat="server" />
                   You are in Role 2
              </contenttemplate>
         </RoleGroup>
    </RoleGroups>
    </asp:LogInView>


    If you do this and it still does not log you in then there is something wrong with the database connection

    I am writing this to verify that you have all of the correct items in place correctly to see if you are logged in.


     

    "Success is the Sum of Small Efforts, Repeated Day in and Day Out - Without Ceasing!"

    Robert Hall
    CEO and Founder
    My Service Solutions, Inc.
  • Re: Can not login and there is no error message!

    07-04-2009, 12:30 AM
    • Member
      2 point Member
    • melih
    • Member since 03-22-2007, 11:18 AM
    • Posts 6

    Thanks alot for quick reply.

    I tried your first code on my default.aspx page. After I redirected from login.aspx I see "You Are Not logged in!"

    But this is really strange. When I put the wrong password on login.aspx page it gives me error. When I do everything right it does not tell me anything and it does not log me in!!!

    I do not think there is a db connection problem. There must be something else...

    Melih
  • Re: Can not login and there is no error message!

    07-04-2009, 12:40 AM
    • Member
      650 point Member
    • Bobby-Z
    • Member since 10-04-2008, 5:53 AM
    • Orange County, CA
    • Posts 297

     Have you tried deleting the user and recreating it?

    "Success is the Sum of Small Efforts, Repeated Day in and Day Out - Without Ceasing!"

    Robert Hall
    CEO and Founder
    My Service Solutions, Inc.
  • Re: Can not login and there is no error message!

    07-04-2009, 12:41 AM
    Answer
    • Member
      2 point Member
    • melih
    • Member since 03-22-2007, 11:18 AM
    • Posts 6

    I figured out the problem...


    in the web.config file there was this code:

    <authentication mode="Forms">
           <forms name="appCookie" loginUrl="Login.aspx" path="/admin"
              cookieless="UseCookies" />
        </authentication>


    All I had to do is to delete admin from path...


    Thanks anyways...


    Melih
Page 1 of 1 (5 items)