debugging login issue with SQL Server

Topics: ASP.NET 2.0
Nov 30, 2011 at 10:25 PM

I'm using Blogengine 2.0 with VS 2008 (.net 3.5) and sQL server.  Ran the scripts and created the db - tables and data look fine.  copied sqlserverweb.config and set the connection string.  I can run the app and it looks fine, no errors, but i can't log in.  I can see the Admin user in the db.  All i ever get is login failed.  I don't usually use forms authentication, but in examining Login.aspx there doesn't seem to be any code that handles the login.  Is this all there should be?  If so does anyone have any tips for troubleshooting login problems?

Where is this code actually hitting the db and checking my credentials?

 

       protected void Page_Load(object sender, EventArgs e)
        {
            this.RegisterHyperLink.NavigateUrl = "register.aspx?ReturnUrl=" +
                                                 HttpUtility.UrlEncode(this.Request.QueryString["ReturnUrl"]);
            this.RegisterHyperLink.Text = labels.createNow;
            ((PlaceHolder)LoginUser.FindControl("phResetPassword")).Visible = BlogSettings.Instance.EnablePasswordReset;

            if (this.Request.QueryString.ToString() == "logoff")
            {
                FormsAuthentication.SignOut();
                if (this.Request.UrlReferrer != null && this.Request.UrlReferrer != this.Request.Url)
                {
                    this.Response.Redirect(this.Request.UrlReferrer.ToString(), true);
                }
                else
                {
                    this.Response.Redirect("login.aspx");
                }

                return;
            }

            if (!this.Page.IsPostBack || Security.IsAuthenticated)
            {
                return;
            }

            this.Master.SetStatus("warning", "Login failed");
        }

Coordinator
Nov 30, 2011 at 10:35 PM

Check db membership provider in the core library, look for function:

ValidateUser(string username, string password)
Dec 1, 2011 at 4:23 PM

Found it in BlogEngine.Core.XML, however, it doesn't exist in BlogEngine.Core.Dll.  In fact the DbMembership namespace doesn't exist.  Is there another dll that implements the DbMembership class?

Coordinator
Dec 1, 2011 at 4:37 PM

The DLL is a binary file complied from source code, you won't find anything readable in DLL. If you look under "downloads" tab on top of this page, you'll find "web", "source" and "msdeploy" versions of application. Only "source" will have core library project, others will use complied BlogEngine.Core.dll. You need to use "source" version if you want to debug code in the core library.

Dec 1, 2011 at 5:41 PM

**** This version is bad news - will not work with sql, source will not compile, many problems.  Don't use this version with SQL. ****

Coordinator
Dec 1, 2011 at 7:31 PM

?? This is exactly same code, only packaged for different distributions. To set it up with SQL provider, follow these steps.