Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6722429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:26:46+00:00 2026-05-26T09:26:46+00:00

I recently inherited an ASP.NET project from another programmer that required consolidating two databases.

  • 0

I recently inherited an ASP.NET project from another programmer that required consolidating two databases. After consolidating them and fixing the resulting problems in the code I dropped the aspnet membership tables and then recreated them with the aspnet_regsql wizard. I created several users and roles and in my application was able to log in just fine using a standard asp.net login control. I then logged out and tried to log in again and it didn’t work.

In an attempt to pinpoint the problem I set breakpoints at the events LoggingIn, Authenticate, and LoggedIn and somehow none of these events are getting fired. The page will validate, but if you enter the correct credentials it seems to just post back without firing any of the login events.

Eventually I got frustrated and moved on to something else. Then today (the next day) I came in and checked again and somehow it let me log in the first time. I tried to log out and log back in and I got the same exact problem. Validation, but no authentication.

Here is the code for my login control:

<asp:Login ID="Login1" runat="server" UserNameLabelText="Username:" PasswordLabelText="Password:" OnLoggedIn="Login1_LoggedIn"></asp:Login>

The Login1_LoggedIn code-behind:

protected void Login1_LoggedIn(object sender, EventArgs e)
{
    if (Roles.IsUserInRole(Login1.UserName,"Administrator"))
        Response.Redirect("~/Admin/Default.aspx");
    else if (Roles.IsUserInRole(Login1.UserName,"Appointment Administrator"))
        Response.Redirect("~/ApptReq/Management/ManageEntities.aspx");
}

Web.config membership sections:

  <system.web>
<authentication mode="Forms">
  <forms loginUrl="Login.aspx" timeout="60" cookieless="UseCookies" name="Test" slidingExpiration="true" path="/"></forms>
</authentication>
<roleManager enabled="true">
  <providers>
    <clear />
    <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="test" applicationName="Test" />
  </providers>
</roleManager>
<membership defaultProvider="AspNetSqlMembershipProvider">
  <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="test" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="Test" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" />
  </providers>
</membership>

I’m going crazy trying to figure this thing out, so any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:26:47+00:00Added an answer on May 26, 2026 at 9:26 am

    Well I feel stupid. Turns out logging in worked fine if you clicked the “Login” button, however every time I was testing I was just hitting the Enter key. The enter key event was being capture by a search button I had on the page which hadn’t been implemented yet so all it did was post back.

    I just wrapped the login control in a panel and set the DefaultButton to the ID of the login button. Problem solved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I inherited a database from another programmer (created / stored with SQL Management
Recently, my team converted ASP.NET project from .NET 1.1 to .NET 2.0. Everything is
I recently inherited a small Java program that takes information from a large database,
I have recently inherited an ASP.Net app using Linq2SQL. Currently, it has its DataContext
I've recently inherited a database driven e-commerce site written in C# ASP.Net, with an
I recently inherited a dinosaur Classic ASP site that has some fresh blood pumped
So, I need to make changes to an asp.net built site that was recently
I've inherited an ecommerce ASP.NET (c# code behind) web application. We've recently moved servers
I recently inherited a Silverlight web project that uses WCF services to handle asynchronous
I have recently moved our ASP.NET session state from InProc to a Sql Server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.