asp.net default account not working IIS RRS feed

  • Question

  • User-1477973738 posted

    I created a website using asp.net default Account ( user, membership, profile etc). 

    By default, the database was placed in the app_Data folder.

    I copied the data and place it in a new folder so I am no longer using the localDB but MSSql server.

    this works fine on my local machine. 

    However, when I upload the project to IIS server 2012 its starts behaving strangely. 

    I already have some test users in the DB like testUeser.  

    If I try login as testUser with the correct password it would redirected to default.aspx which its suppose to but testUser will not be login. 

    If I try testuser with the wrong password it would say wrong user or password please try again like normal.

    If I try to register testUser again it will say user already Registered like normal.

    The only thing for some reason does allow testuser or any user to login.

    Help, please...thanks

    Tuesday, October 29, 2019 12:15 AM

All replies

  • User-848649084 posted


    Could you share your login code and connection string?

    please check under which application pool identity your application pool is running in the old server and 2012 server. 

    also, check anonymous authentication is enabled and the rest are disabled. 

    Tuesday, October 29, 2019 2:38 AM
  • User-1477973738 posted

    <add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog= myApp-20170220153012; User ID=sa; Password=xxxxxxxxxxxx" providerName="System.Data.SqlClient" />

    application pool on the local machine  is Clr4IntegratedAppPool 

    application pool on the server is .Net V4.5 Classic

    login code

    RegisterHyperLink.NavigateUrl = "Register";
    //OpenAuthLogin.ReturnUrl = Request.QueryString["ReturnUrl"]; for social media

    var returnUrl = HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
    if (!String.IsNullOrEmpty(returnUrl))
    RegisterHyperLink.NavigateUrl += "?ReturnUrl=" + returnUrl;


    Tuesday, October 29, 2019 1:44 PM
  • User-848649084 posted

    why you changed the application pool from integrated to classic application pool? 

    could you share both application pool advance setting snapshot? 

    To check the application pool identity you could follow the below steps:
    1)open iis manager.
    2)select application pools and select your application pool name from the middle pane.
    3)select the advance setting from the action pane.

    Wednesday, October 30, 2019 2:50 AM