Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pronto 61 posts 172 karma points
    Apr 29, 2014 @ 16:41
    pronto
    0

    Login failed for user in Umbraco 7

    Hi All,

    I'm having an issue with Umbraco 7.1 (developing on localhost), with which I can't login to the Umbraco UI and I receive the message "Login failed for user MyUser". Using developers tools I also get the error "Failed to load resource: the server responded with a status of 400 (Bad Request) http://mysite.local/umbraco/backoffice/UmbracoApi/Authentication/PostLogin

    Is this something to do with using localhost maybe or is there another reason? A few other people have had what seems the same issue but none of those threads have a conclusion, so I was hoping there might be an update on the issue at this point?

    I've tried fresh installs of versions Umbraco 7.1 & 7.1.1 with MySQL 5.6, .NET Framework 4.5.1 & IIS7. I've also tried it in Chrome and Firefox browsers as I heard Chrome can have issues with caching. Any help would be really appreciated.

    Kind Regards

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 29, 2014 @ 17:10
    Jan Skovgaard
    0

    Hi pronto

    Hmm, could you try doing a fresh installation using CE SQL? Just to see if this may be related to the use of MySQL?

    I suppose it does not help to refresh the browser window when trying to log in? Yes it's a basic question but I've seen this in an earlier release where I just refreshed the browser window and then I could login just fine :) - Perhaps try having the console log open with the "disable cache..." enabled if you're using Google Chrome.

    Hope this helps.

    /Jan

  • pronto 61 posts 172 karma points
    Apr 29, 2014 @ 17:24
    pronto
    0

    Hi Jan,

    Thanks for the reply! I've just tried a fresh install with CE SQL and I get the same issue unfortunately! I've also cleared my browser caches and also disabled the cache whilst my DevTools are open.

    This might be coincidental but I now get the DevTools error "GET http://mysite.local/umbraco/backoffice/UmbracoApi/Authentication/IsAuthenticated 400 (Bad Request)  angular.min.js:106" before the login attempt. Any ideas what the issue could be?

    Kind Regards

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 29, 2014 @ 23:31
    Jan Skovgaard
    0

    Hi Pronto

    Ok...that's really odd...what operating system are you using?

    And have you checked with the documentation on this forum to see if permissions have been setup correctly?

    /Jan

  • Mathew Evans 5 posts 25 karma points
    Apr 30, 2014 @ 17:14
    Mathew Evans
    0

    Im also getting this issue but only when using windows 2008 r2

    It works fine when im running it locally on my laptop.

    I have followed the documentation about permissions but it still didnt resolve it

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 30, 2014 @ 17:20
    Jan Skovgaard
    0

    Hi Matthew and welcome to our :)

    What database are you using?

    And are you able to see some errors in the /app_data/logs file? (On your server)

    /Jan

  • Mathew Evans 5 posts 25 karma points
    Apr 30, 2014 @ 17:29
    Mathew Evans
    0

    Im using SQL Server 2008 R2

    There are no errors in the logs... just info

     

    getting these in the browser console

    GET http://sfm.local/umbraco/backoffice/UmbracoApi/Authentication/IsAuthenticated 400 (Bad Request) angular.min.js:106

    POST http://sfm.local/umbraco/backoffice/UmbracoApi/Authentication/PostLogin 400 (Bad Request) angular.min.js:106

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 30, 2014 @ 17:46
    Jan Skovgaard
    0

    Ok...maybe it's a good idea to create an issue about this on the issue tracker with a reference to this post. Seems like a bug that needs to be handled. It's just so strange that it happens to some and not to others...

    If one of you create an issue please make a link to it from here as well.

    Cheers, Jan

  • Mathew Evans 5 posts 25 karma points
    Apr 30, 2014 @ 18:46
    Mathew Evans
    0

    as requested... raise issue and here is the link

    http://issues.umbraco.org/issue/U4-4796

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Apr 30, 2014 @ 18:56
    Sebastiaan Janssen
    1

    Does your server have .net 4.5 installed?

    This is not a bug else a few thousand other people would have the same issue. So it must be a misconfiguration somewhere.

  • Mathew Evans 5 posts 25 karma points
    Apr 30, 2014 @ 19:08
    Mathew Evans
    0

    Yes the server has .NET 4.5 installed

     

  • Mathew Evans 5 posts 25 karma points
    Apr 30, 2014 @ 19:09
    Mathew Evans
    0

    I have given network service full rights to everything from the website down

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Apr 30, 2014 @ 19:17
    Sebastiaan Janssen
    0

    Does the web.config have a Machine Key defined?
    Is the web.config file the same as on your local machine (except for maybe connection string differences)?

  • Scott 95 posts 277 karma points
    Jul 23, 2014 @ 16:54
    Scott
    0

    We have the same issue, fresh installation of 7.1.4, I was logged in and now it won't log in.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 23, 2014 @ 17:01
    Sebastiaan Janssen
    0

    @Scott are you using the e-mail address you used during install? The email address is your username.

    If you're using that then you may be locked out, check the UmbracoUser table to see if userNoConsole is set to 1 or true, it should be 0 or false.

  • Richard Hamilton 79 posts 169 karma points
    Aug 11, 2016 @ 13:48
    Richard Hamilton
    1

    I had this same problem and this was the solution. Not very obvious, do you think the reply from the server should be more descriptive in this case?

    ( UmbracoUser table to see if userNoConsole is set to 1 or true )

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Aug 11, 2016 @ 14:30
    Steve Morgan
    1

    Security wise - no. You should never show why someone can't log in. It allows the confirmation of a valid username.

  • Scott 95 posts 277 karma points
    Jul 23, 2014 @ 17:09
    Scott
    0

    Hi Sebastiaan,

    I used my e-mail address, and yes is shows locked out in the log:

    Cannot validate member [email protected] because they are currently locked out

    Why does this happen, pretty frustrating?

    The solution you gave worked, thank you.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 23, 2014 @ 17:31
    Sebastiaan Janssen
    1

    Because you entered your credentials wrong 5 times, you can set maxInvalidPasswordAttempts to a different value for the UsersMembershipProvider in your web.config file. For example maxInvalidPasswordAttempts="15".

    It's to prevent hackers from trying millions of passwords trying to guess yours.

  • edwich44 17 posts 93 karma points
    Aug 05, 2014 @ 12:39
    edwich44
    0

    @Sebastiaan I had an issue logging in as well, I went to umbracoUser table and changed userNoConsole to False and its working now. Thank you

  • khm1985 8 posts 54 karma points
    Aug 27, 2014 @ 20:02
    khm1985
    3

    Today I stumbled upon the exact same problem in version 7.1.4. When trying to logging into Umbraco Backoffice I got the error:
    POST http://tena.pointshop.local/umbraco/backoffice/UmbracoApi/Authentication/PostLogin 400 (Bad Request)

    All of a sudden I was not able to login into Umbraco Backoffice. I did set the admin user back to userNoConsole = false in the umbracoUser table. Still not able to log in.

    I tried restoring a backup of my database, and then I was able to login. The PostLogin error went away. Could there be another place in the database, which could cause this issue I thought to myself?!

    I suspected the 301 URL Tracker package for messing up paths to Umbraco Backoffice API methods. So I deleted all records in table icUrlTracker, and presto, I could log in to Umbraco Backoffice again.

    I hope this can help others. If anyone can recreate the problem with "301 Url Tracker", it must be a bug in the package and the author should be notified about it :-)

  • Nurhak Kaya 53 posts 147 karma points MVP 3x c-trib
    Mar 16, 2018 @ 15:18
    Nurhak Kaya
    0

    @khm1985 thank you very much for this post, only your suggestion has helped me fixing my problem.

  • Lewis 27 posts 90 karma points
    Aug 30, 2014 @ 11:50
    Lewis
    0

    I had problems logging in and it was setting the 'userNoConsole' value to '0' that solved them.

    What is this column used for? 

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 30, 2014 @ 13:27
    Sebastiaan Janssen
    0

    It's used for blocking any further login attempts after a certain number of failed login attempts for that user. In 7.1.5+ and 6.2.2+ we've increased the default number of failed attempts before you get blocked from 5 to 20.

  • Michiel 30 posts 61 karma points
    Oct 15, 2014 @ 10:08
    Michiel
    0

    Thx Lewis, I think that did the trick!

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Apr 16, 2015 @ 17:33
    Steve Morgan
    0

    khm1985 that is an awesome post. You've just saved my evening of swearing. 

    I had a working copy of Umbraco 2 hours ago - was in the middle of adding some new stuff and then suddenly it stopped letting me log in. I tried everything... 400 errors everywhere,.

    Trunced the table [icUrlTracker] and viola! THANKYOU!

  • Henning Molbaek 49 posts 99 karma points
    Aug 03, 2015 @ 15:22
    Henning Molbaek
    0

    Could anyone help me with the code in web.config?

    I have a 7.2.4 install and can't log on. However, I can't find the icUrlTracker table in database. What am I missing here?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2015 @ 15:28
    Sebastiaan Janssen
    1

    icUrlTracker is not part of the normal umbraco install, it's a package (https://our.umbraco.org/projects/developer-tools/301-url-tracker).

    What is the error you see in the logs? (~/App_Data/Logs/UmbracoTraceLog.txt)

  • Henning Molbaek 49 posts 99 karma points
    Aug 03, 2015 @ 15:31
    Henning Molbaek
    0

    Oh, great. How do I add the maxInvalidPasswordAttempts="15" to my web.config?

    Do I simply add it to this line?

  • Henning Molbaek 49 posts 99 karma points
    Aug 03, 2015 @ 15:32
    Henning Molbaek
    1
    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
    
  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2015 @ 15:47
    Sebastiaan Janssen
    0

    You add it to this one:

    <add name="UmbracoMembershipProvider" type="Umbraco.Web.Security.Providers.MembersMembershipProvider, Umbraco" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="4" useLegacyEncoding="true" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Member" passwordFormat="Hashed"/>
    

    The default is already set to 20 so it's not necessary to add that in 7.2.4 unless you want to change it to 15.

    If you're already locked out, check the posts above and update the userNoConsole column in the umbracoUser table to 0 or false.

  • Henning Molbaek 49 posts 99 karma points
    Aug 03, 2015 @ 16:26
    Henning Molbaek
    0

    Okay, this do no work. Any way to recover the password or see what is wrong? I still can't log on.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 03, 2015 @ 20:50
    Sebastiaan Janssen
    1

    No, the password is encrypted. The best way to get access again:

    1. Check that userNoConsole is set to 0 or false
    2. Create a fresh install of 7.2.4, set the password and remember it this time and then copy that password into the user on your existing install
  • Henning Molbaek 49 posts 99 karma points
    Aug 04, 2015 @ 07:24
    Henning Molbaek
    0

    Okay, so if I copy the encrypted password from the user table of the new install to the old it should work?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 04, 2015 @ 08:00
    Sebastiaan Janssen
    1

    Yes.

  • Gavin Pollock 8 posts 72 karma points
    Aug 18, 2015 @ 13:19
    Gavin Pollock
    1

    Hi guys,

    We're having this issue, with the 400 error messages on the PostLogin call on a new desktop build that we have. It's Windows 8.1 Enterprise.

    The crazy thing is that we have the Umbraco site in TFS from another dev virtual desktop environment (based on Server 2012), using exactly the same database, and the same files, where it works perfectly.

    Have spent hours pulling our hair out, checking all of the above. Installing fresh Umbraco's via WebMatrix, initially with SQL CE and then full SQL. Done a full compare of all config files (applicationHost, web.config, etc). Windows firewall is off. Checked user logins in SQL DB etc.

    Nothing at all in the umbraco Trace Log. Same behaviour every time.

    When a new site is installed, at the end of the install process the user is logged into the backend. But if you close the browser, you are then unable to login again. Even if you open an incognito window while you have the logged in session, it's not possible to login.

    Any ideas!?

  • Chad 25 posts 196 karma points
    Sep 18, 2015 @ 21:48
    Chad
    0

    Same issue here, I have a local environment and a different staging environment that shares the same database. I can log in on the staging environment but not locally as of yesterday.

    I've verified that userNoConsole is false, compared the web.config files, and checked the Trace Log - everything looks correct.

  • Joao Ferreira 1 post 71 karma points
    Oct 06, 2015 @ 09:12
    Joao Ferreira
    0

    Hi guys, I have the exact same problem. I have the same files and db on both server and local machine and on the server I can't loggin. I get a 400 message, bad request. Both solutions are under IIS...

  • Jake 2 posts 72 karma points
    Nov 28, 2015 @ 05:22
    Jake
    0

    I get this same error too... I wonder if it is a bug that was introduced.

  • Niels Lynggaard 192 posts 550 karma points
    Dec 29, 2015 @ 01:03
    Niels Lynggaard
    0

    I'm getting this error as well on a few local sites, after re-installed my machine with windows 10, all my dev sites are giving me "400 bad request" on admin login.

    I tried a fresh umbraco installation with SQL CE (my other dev sites are using this as well), and it works fine.

    I tried setting the "NoConsole" to false on my other sites (its not false on the new one), and tried changing the hashed pw in the database to the new one..

    I'm still not able to log in to the back-office.. Pulling hair, swearing and fiddling with things aren't helping either.

    I wonder what does it?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Dec 29, 2015 @ 13:41
    Sebastiaan Janssen
    1

    Probably didn't register .net correctly in IIS.

  • Gavin Pollock 8 posts 72 karma points
    Dec 29, 2015 @ 08:30
    Gavin Pollock
    0

    In the end we rebuilt a whole new desktop image and installed things one by one. We had it successfully working with VS 2012 & 2013 installed and SQL 2012.

    What we did then notice was that installing the tools required to do SSIS packages then made it break. I can't recall exactly what install it was though and the guy that did it is on holiday.

    Must be some sort of versioning of a specific .Net DLL or something weird!!?

    If anyone does manage to trace it down it would be incredibly helpful.

  • Niels Lynggaard 192 posts 550 karma points
    Dec 29, 2015 @ 23:26
    Niels Lynggaard
    0

    Hmm.. Yeah, this is wierd indeed.

    I haven't set up the IIS, I'm just using the debug in visual studio.

    Both solutions are just set up with visual studio + nuget umbraco.

    A completely new site with umbraco installed through nuget works perfect.

    Umbraco frontend and controller actions works fine, but the login returns 400 bad request.

    It may be a good suggestion that the .net isn't registered correctly, since I've battled this issue before when installing different versions of Visual Studio.

    I'm going to battle this a bit more, if I manage to get it working, I'll let you know what I did.

  • Niels Lynggaard 192 posts 550 karma points
    Dec 30, 2015 @ 00:32
    Niels Lynggaard
    0

    Slowly going nuts.

    Things I've tried; Re-installing umbraco via nuget Enabling IIS in windows features and enabling application development etc.

    running aspregiis

    Installing a fresh copy of umbraco 7.3.3 into a new web application via nuget.. -> Login works perfectly... I guess I'll have to do something like that and setup the whole shabang again..

    Interesting fact, though; Swapping the database on the fresh (working) installation, the login breaks and throws the 400 bad request, so I guess it has to do with the SQL CE database beeing copied... Very strange.

  • mikkelrom 2 posts 22 karma points
    Jan 19, 2016 @ 07:48
    mikkelrom
    0

    I was also going nuts getting the 400 Bad Request error on the login-screen.

    BUT... it turned out that in my case the error was due to an incorrect password (OMG!). I was confused by the weird 400 Bad Request error.

    Hopefully, this can help someone out. :)


    Version info:

    Umbraco version 7.2.1 assembly: 1.0.5462.37503
    
  • sadegh 6 posts 26 karma points
    Feb 08, 2016 @ 07:32
    sadegh
    0

    Hi I have the same issue with version 7.3.7 first login after instalation is OK but after a while and session expiration i cannot login to system again.

    response: /umbraco/backoffice/UmbracoApi/Authentication/PostLogin 400 (Bad Request)

    server log: 2016-02-08 11:01:45,659 [P34804/D91/T6484] INFO Umbraco.Core.Security.BackOfficeSignInManager - Event Id: 0, state: Login attempt failed for username [admin]from IP address [my ip]

  • kim Thomsen 59 posts 277 karma points
    Feb 15, 2016 @ 09:20
    kim Thomsen
    0

    We are facing the same issue in 7.3.7 for some reason the field "userNoConsole" is changed to "1" in the UmbracoUser Table after that we cant login to the backoffice.

  • M T 35 posts 212 karma points
    Mar 09, 2016 @ 16:20
    M T
    0

    I'm having the same issue, except none of the above work and I can still log in with other users, just not my top level admin... This happens fairly often and each time it seems to fix it's self in a different way each time.

    Strange.. M

  • Chad 25 posts 196 karma points
    Mar 10, 2016 @ 23:06
    Chad
    0

    I haven't had this happen for a while, but now it's doing it again. I can run the Umbraco site locally (had updated to v7.3.4) with setting the connection string to use my Azure database and then log in to the backoffice, add new users, make content updates, etc. But, when I deploy everything to my Azure web server, I can't log in to the admin despite all files and data being the same.

    It acts as if it doesn't connect to the database to check the user login, it just throws the Bad Request error almost immediately no matter what username and password you put in.

    Still no master solution for this?

  • Rasmus Lynggaard 118 posts 325 karma points
    Apr 07, 2016 @ 07:56
    Rasmus Lynggaard
    0

    I encountered a similar problem, and it turned out to be a lowercase rule in the IIS URL rewrite module. Umbraco, for some reason, have some casesensitivity. I found a workaround at http://www.wiliam.com.au/wiliam-blog/iis-url-redirects-to-lowercase-and-umbraco-cms

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Apr 21, 2016 @ 11:42
    Simon Dingley
    3

    I have hit this a couple of times before and again today on a site I've not accessed for a while. I think there was a Windows update or something in the past which may have broke things but adding the following to the web.config fixed it for me:

    <httpProtocol>
       <customHeaders>
          <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
       </customHeaders>
    </httpProtocol>
    

    I've done this temporarily until I can investigate why.

    Simon

  • kleptbit 42 posts 98 karma points
    Jun 08, 2016 @ 13:43
    kleptbit
    0

    Thanks Simon, this solved my issue with the admin user being locked out in 7.3.8 with the response: /umbraco/backoffice/UmbracoApi/Authentication/PostLogin 400 (Bad Request) error.

    The userNoConsole was set to 1 and resetting to 0 did nothing, nor did resetting the admin password in the database or restarting IIS.

    Thanks Simon!

  • Mihai Savu 11 posts 75 karma points
    Jun 13, 2016 @ 13:03
    Mihai Savu
    0

    It's not enough to edit the password hash in DB or to set the userNoConsole = 0. The DB changes became effective only after I recycled the app pool.

  • Chen 39 posts 68 karma points
    Jul 05, 2016 @ 15:21
    Chen
    0

    I'm having similar issues here. Any help would be greatly appreciated.

    I'm running Umbraco v7.4.3 on local IIS. Installed with SQL CE database. The installation process went without a problem. However, when I tried to log back in, it wouldn't let me!?!

    I'm sure the password is correct because I had to reinstalled the site again due to this exact same issue. So I paid extra attention on the password, and it's defintely not a incorrect password.

    I keep getting this 400 error for some reason.

    enter image description here

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jul 05, 2016 @ 15:24
    Simon Dingley
    0

    Have you tried the solution I posted above?

  • Chen 39 posts 68 karma points
    Jul 05, 2016 @ 15:28
    Chen
    0

    Hi Simon,

    Wow! Thanks for getting back so quickly. Yes, I've added customHeaders code you suggested above. Unfortunately, I'm still getting the same error :(

    My machine is running Windows 10 by the way, not sure if that makes any differences.

    Chen

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 05, 2016 @ 15:31
    Sebastiaan Janssen
    0

    Start by setting debug=false in your web.config an then try again, see what happens. In your network tab there may be more information on the failed PostLogin request. If not, check your logs.

    Also make absolutely sure that your web.config is exactly the same as the one we ship with (with just the version of Umbraco added and the connectionstring updated).

  • Chen 39 posts 68 karma points
    Jul 05, 2016 @ 15:53
    Chen
    1

    Hi Sebastiaan,

    Thank you for your reply.

    I have double checked the web.config with the one that came with Umbraco zip, only different sections are:

    <add key="umbracoConfigurationStatus" value="7.4.3" />
    

    and

    <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
    

    Also, I have added the code Simon had suggested earlier:

    <httpProtocol>
    <customHeaders>
        <remove name="X-Powered-By" />
        <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
    </customHeaders>
    

    Everything else is absolutely the same. I've not installed any starter template, or made any change in the admin section. The first thing I did upon finishing the installation was to log out.

    As for the 100 error in the console, I took a screenshot of the network tab as you suggested:

    enter image description here

    Chen

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jul 05, 2016 @ 16:12
    Simon Dingley
    0

    Can you also post the contents of the response tab from the console and the last part of your log file where the error occurs?

  • Chen 39 posts 68 karma points
    Jul 05, 2016 @ 16:23
    Chen
    0

    Hi Simon,

    The 'response' tab under 'Network' is empty.

    However, in the 'console' where 400 error is logged. When I click on the link on the right (http://mydomain.com/umbraco/backoffice/UmbracoApi/Authentication/PostLogin), it returns the following:

    =========================================================

    )]}', {"Message":"The requested resource does not support http method 'GET'."}

    =========================================================

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 05, 2016 @ 16:24
    Sebastiaan Janssen
    0

    Make sure to check ALL of the other suggestions in this thread, including what the user looks like in the database (check the noConsole column) and make sure to set debug=true in web.config.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 05, 2016 @ 16:30
    Sebastiaan Janssen
    0

    Try the suggestions in this answer here: http://stackoverflow.com/a/24626443/5018

  • Ryan Brown 12 posts 82 karma points
    Jul 05, 2016 @ 22:07
    Ryan Brown
    0

    It looks like the tag mentioned in that SO answer:

    <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    

    is already in the default web.config? Or am I missing something there?

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 08:14
    Chen
    0

    Good morning Sebastiaan,

    Thank you for your suggestions. I have checked the umbracoUser table in SQL CE database, and the 'noConsole' shows up as an unchecked checkbox, so I assume that means 0 (or false)? Also set debug=true in the following block in web.config

    <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.5">
    

    I added the code block from StackOverflow in the link you suggested.

    <handlers>
    <remove name="WebDAV" />
    <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
    <remove name="OPTIONSVerbHandler" />
    <remove name="TRACEVerbHandler" />
    <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,POST,PUT,PATCH,MERGE" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    

    Unfortunately, the issue still persists. I also tried a fresh install of v7.3.8 and v7.2.8, both with SQL CE, and both had exact same issue. I'm not sure if it's an SQL CE issue as I've always worked with SQL server 2008 R2, and have never come across this problem before. The only experience I've had with SQL CE was with v6 (hosted on local IIS on Windows 7), and there was no issues there.

    By the way, I'm hosting all the site in IIS on my local Windows 10 machine. The first time I encountered this issue was yesterday, when I ran the site in IIS Express straight from Visual Studio (installed v7.4.3 via NuGet).

    Chen

  • Ryan Brown 12 posts 82 karma points
    Jul 05, 2016 @ 21:02
    Ryan Brown
    0

    I'm having the same issue on my dev machine. Brand new install via the downloadable zip with 7.4.3, SQL Server 2012, Windows 7, IIS 7. I'm still working through the suggestions in this thread.

    I'm having the same issue on another install on the same machine after upgrading from 7.1.6 to 7.4.3. This install is running in IIS express and was installed via nuget.

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 09:23
    Chen
    0

    Dear all,

    Just a quick update on this issue.

    I have just tried 2 other different set ups both with clean install of v7.4.3. Unfortunately both have experienced the exact same issue: 400 error on the 'PostLogin'.

    set up 1: (Localhost) Local IIS (Windows 10) SQL 2008 Server

    set up 2: (remote server on network) IIS on Windows Server 2008 R2 SQL 2008 Server

    No modifications made to both installations. Once set up had completed, I logged out straight away and tried to log back in. That's when the issue occurred.

    I have multiple sites running Umbraco v6 using set up 2. And none of which has ever had this issue before. All permission are set exactly the same way. The web.config of v6's is quite different to v7's, I'm not sure what to look out for so just kept it the way it came in as.

    Would anybody be kind enough to provide a working version of their web.config, obviously with sensitive information removed, so I can compare it with the stock one?

    Thank you in advance.

    Chen

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Jul 06, 2016 @ 09:28
    Steve Morgan
    0

    This sounds odd - there's something in the mix here that is causing issues and I'd be surprised if it's the web.config if you've tried two different installs and on a remote server.

    I'd imagine it's something browser / client side.

    Try - a different browser (login cookie issue?). And / or setting your password on install to something safe (are you entering some kind of special character that's being stripped on login??).

    Is there a different PC that you can try logging into the remote server via..

    Divide and conquer!

    Steve

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 09:44
    Chen
    0

    Thank you Steve for your input. I agree, this is indeed very strange.

    Okay, here are some information regarding the installation:

    password = "password" no surprises there.

    url = mydomain.local/umbraco/... now, I suspect it might have something to do with this? since it's not a real domain? I'm using my hosts file to point to the local (and remote) server, rather than going through a DNS. However, I've always done this in the past with v6 and never had problems.

    I have tried in 3 different browsers and cleared cache each time, still getting the same result.

    I will try a different PC later and let you guys know what happens. I will have to modify the hosts file since I don't have a DNS server.

    Regards,

    Chen

  • Ryan Brown 12 posts 82 karma points
    Jul 06, 2016 @ 14:20
    Ryan Brown
    0

    I've tried in Chrome, FF, and IE 11, and incognito mode in Chrome. Same result in all attempts.

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 14:27
    Chen
    0

    @Ryan,

    Not sure if you saw my last couple of messages. Have you tried logging in with your email instead of name? Umbraco seems to set email address (the one you entered during set up process) as username by default. That's why I couldn't log in before.

    Chen

  • Ryan Brown 12 posts 82 karma points
    Jul 06, 2016 @ 15:16
    Ryan Brown
    0

    Yes, I've tried both the userName/userLogin and the userEmail values as specified in the umbracoUser table. I've had no luck with any of them.

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 16:31
    Chen
    0

    @Ryan,

    It seems that you may have other issues with the set up than I did. Did you get a chance to take a peek at the log file? Wondering if you've been getting the same errors as I did before.

    By the way, I made no modification in web.config, and I'm running v7.4.3 locally (IIS Express) right from within Visual Studio.

    Chen

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 09:56
    Chen
    0

    Ok, just accessed the 'UmbracoTraceLog' in '/App_Data/Logs'. And there seems to be some kind of error:

    2016-07-06 10:08:40,449 [P4556/D2/T9] INFO Umbraco.Core.Sync.ApplicationUrlHelper - ApplicationUrl: http://mydomain.local:80/umbraco (UmbracoModule request) 2016-07-06 10:08:41,009 [P4556/D2/T9] WARN Umbraco.Web.UmbracoModule - Umbraco has no content 2016-07-06 10:08:43,064 [P4556/D2/T9] WARN Umbraco.Web.UmbracoModule - Umbraco has no content 2016-07-06 10:08:49,572 [P4556/D2/T9] INFO Umbraco.Core.PluginManager - Starting resolution types of Umbraco.Core.PropertyEditors.IParameterEditor 2016-07-06 10:08:49,587 [P4556/D2/T9] INFO Umbraco.Core.PluginManager - Completed resolution of types of Umbraco.Core.PropertyEditors.IParameterEditor, found 0 (took 19ms) 2016-07-06 10:09:10,589 [P4556/D2/T17] INFO Umbraco.Core.PluginManager - Starting resolution types of Umbraco.Core.Persistence.Mappers.BaseMapper 2016-07-06 10:09:10,605 [P4556/D2/T17] INFO Umbraco.Core.PluginManager - Completed resolution of types of Umbraco.Core.Persistence.Mappers.BaseMapper, found 0 (took 14ms) 2016-07-06 10:09:11,009 [P4556/D2/T17] INFO Umbraco.Core.Security.BackOfficeSignInManager - Event Id: 0, state: Login attempt failed for username npadmin from IP address 192.168.0.144 2016-07-06 10:09:19,042 [P4556/D2/T17] INFO Umbraco.Core.Security.BackOfficeSignInManager - Event Id: 0, state: Login attempt failed for username npadmin from IP address 192.168.0.144 2016-07-06 10:09:48,943 [P4556/D2/T10] INFO umbraco.BusinessLogic.Log - Log scrubbed. Removed all items older than 2016-07-05 10:09:48 2016-07-06 10:09:51,870 [P4556/D2/T14] ERROR Umbraco.Web.Scheduling.KeepAlive - Failed (at "http://mydomain.local:80/umbraco"). System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'mydomain.local' at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Umbraco.Web.Scheduling.KeepAlive.

    I'm not sure what to make of this. Would anyone be able to help please?

    Thank you kindly.

    Chen

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 11:13
    Chen
    2

    @Sebastiaan @Simon @Steve, you guys are gonna laugh at me.

    Okay guys! I know what is wrong. Or at least for my case.

    Umbraco uses email address as username by default, and I was using 'name'.

    Sorry to bother everybody with such a noob mistake.

    Chen

  • Mihai Savu 11 posts 75 karma points
    Jul 06, 2016 @ 11:28
    Mihai Savu
    0

    Hi Chen,

    Q1: Are you able to access the http://mydomain.local (the public site, not the backoffice) in your browser? Can it serve a simple static html page?

    Q2: Did you try http://mydomain.local/umbraco and also http://mydomain.local/umbraco/ (note the trailing fwd slash)

    Q3: Are there two or more hostnames for your website in IIS? This could be an issue as well.

  • Chen 39 posts 68 karma points
    Jul 06, 2016 @ 11:37
    Chen
    0

    Hi Mihai,

    Thank you for helping out mate! I have discovered what the issue was as per my previous post. It was a silly, silly mistake on my part - I forgot Umbraco uses email address as username by default. And I kept using 'name', of couse it wouldn't let me in.

    Anyway, thanks for trying to help. Appreciate it!

    Chen

  • Ryan Brown 12 posts 82 karma points
    Jul 08, 2016 @ 21:46
    Ryan Brown
    0

    I've done another fresh install from the downloaded zip, immediately logged out, and then am completely prevented from logging in. I can navigate to the site, but since there's no content there my only option is to attempt to login, which fails.

    Interestingly, I've tried to log in repeatedly with the intention of trying to lock the user. That never occurs. The user never gets locked (the userNoConsole value is always 0, failedLoginAttempts is null, as is lastLockoutDate). There are no errors in the logs; just the "Login attempt failed for username XXX from IP address 127.0.0.1." The fact that none of those fields are modified makes me think there's a disconnect somewhere after the initial install and configuration.

    Does anyone have any suggestions on what to try next?

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jul 09, 2016 @ 05:51
    Simon Dingley
    0

    Have you checked your browser console for errors? I suspect that you have an error as above about the resource not allowing the http method.

    If this is repeatable it should be logged on the issue tracker if it's not already.

  • Ryan Brown 12 posts 82 karma points
    Jul 11, 2016 @ 15:46
    Ryan Brown
    0

    Yes, I see the same immediate "400 Bad Request" that many, many other people in this thread have mentioned. There exists an issue in the issue tracker for this problem. It was closed as "Can't Reproduce" and then ignored by the Umbraco dev team. That seems to be a bit of a recurring theme around here. Often the user is directed back to these forums, where it becomes clear that there is a problem, only to be told they need to open an issue in the Issue Tracker. It's a frustrating cycle.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 11, 2016 @ 16:05
    Sebastiaan Janssen
    0

    It is SUPER frustrating, indeed, especially since.. unsurprisingly, we haven't been able to reproduce this problem. If you have this problem and have steps to reproduce it and it is also broken on other people's machines then we can do something about it.

    What's also frustrating for us is when people who have this problem add to this post saying "I have this problem". There's many suggestions and various fixes in this post and in the issue on the tracker. It would be much more valuable if you have this problem is to list the things that you've actually tried (not just: I've tried everything, there's so many suggestions that it's hard to believe that you tried literally every one of them).

    So: no, we are definitely not ignoring the issue, we just cannot find a cause for it other than user error sometimes (for example: rewrite rules, forgotten passwords, misremembered user names etc.).

  • Ryan Brown 12 posts 82 karma points
    Jul 11, 2016 @ 22:10
    Ryan Brown
    0

    I will list the exact steps I go through to perform an upgrade which will not allow me to log in.

    For my existing 7.1.6 install upgrade (Windows 7, Umbraco 7.1.6 to 7.4.3, SQL Server 12.0.4213.0, Visual Studio 2013, IIS Express):

    • I comment out all rewrite rules before beginning an upgrade.
    • I test my username and password (which are stored in a password manager; no possiblity of fatfingering it when copy and pasting) by logging into the existing site on my development machine.
    • Stop the website
    • I perform an upgrade via nuget
    • I add back in our Global.asax.cs file and modify the Global.asax file to load it.
    • I fix the UsersMembershipProvider type in our web.config. It does not get correctly modified to "Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco" by nuget
    • I remove the following foreign keys from my database because they cause the upgrade to fail as detailed in this fixed issue.
      • cmsTemplateFKcmsTemplate_cmsTemplate
      • cmsPropertyTypeGroupFKcmsPropertyTypeGroupcmsPropertyTypeGroupid
    • I start the website and perform the upgrade.
    • I log out.
    • I cannot log back in.

    At this point I have tried:

    • using both my old userLogin as the username (which still works in production) and the userEmail as usernames (neither works)
    • checking the umbracoUser table for problems (userNoConsole, failedLoginAttempts)
    • Check that my web.config has a machineKey value defined (it does)
    • Logging in via another browser, or in incognito mode to rule out bad cookies. (no luck)
    • Checking the logs:

      2016-07-11 15:38:02,117 [23] INFO Umbraco.Core.Security.BackOfficeSignInManager - Event Id: 0, state: Login attempt failed for username USERNAME from IP address 127.0.0.1

    • Checking that .NET 4.5 is installed (it is. This project is a .NET 4.5 project)

    • Check to see if I have 301 URL Tracker installed (I do not)
    • Uncommented the rewrite rules (no luck). Commented them out again (no luck).
    • Added the CustomHeaders values suggested here. (no luck) Removed them (no luck).
    • Set "debug = false" in my web.config. (no luck)
    • Set "debug = true" in my web.config (no luck)
    • Added "config.MapHttpAttributeRoutes(); " to my WebApiConfig per this Stack Overflow post (no luck)
    • Check that Webdav is already disabled (it is), Enable ExtensionlessUrlHandler (no luck)

    Having done all of that, I still see only "Login failed for user" in the browser and this in the console: enter image description here

    I do see the "failed login attempts" increment as I am testing (with the valid password I began with copy/pasted into the form). I have to reset the userNoConsole flag as I am locked out. After the account is locked, and then unlocked (userNoConsole set = false) I have to restart the site before the "failed login attempts" begins to increment again.

    I do have SQL Server Data Tools (I think that's what is referenced here) installed.

    I had the same login issue with a fresh 7.4.3 install (same sql server, same OS, directly into IIS rather than through IIS express).

    Is there any way that I can step into the umbraco code provided via nuget to debug (a source/symbol package)? I attempted to download the source code and step into it, but the nuget package assembly hashes do not match that of assemblies I build locally. I could point my local environment at those locally built assemblies, but that seems like an invalid test.

    What other information can I provide to you to help in reproducing/debugging/fixing this error?

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 12, 2016 @ 09:18
    Sebastiaan Janssen
    1

    Great, now we have something to go on!

    I add back in our Global.asax.cs file and modify the Global.asax file to load it.

    What are you doing in Global.asax.cs? We prefer you use ApplicationEventHandlers to do stuff on startup

    I fix the UsersMembershipProvider type in our web.config. It does not get correctly modified to "Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco" by nuget

    What is it currently, before you correct it? I can look into it.

    I remove the following foreign keys

    The issue you link to indicates it's fixed though, so if you upgrade straight to 7.4.3 this should not be necessary.

    I cannot log back in.

    Can you check these two properties on the UsersMembershipProvider are set to useLegacyEncoding="true" and passwordFormat="Hashed"? I'm assuming that's how they were set on your old version.

    Check that my web.config has a machineKey value defined (it does)

    It doesn't need to, is there a reason for that, that you know of?

    Is there any way that I can step into the umbraco code provided via nuget to debug

    Not sure, you can however build the 7.4.3 source and use the output files in src\Umbraco.Web.UI\bin to drop into your bin folder. You can then attach the debugger to your running site with those binaries and debug the Umbraco source.

  • Ryan Brown 12 posts 82 karma points
    Jul 13, 2016 @ 16:26
    Ryan Brown
    0

    We have an error handler in the Global.asax.cs:

    protected void Application_Error(object sender, EventArgs e)
    

    I'm not certain that it's ever hit. I'll attempt the upgrade without that modification. Based on what I detail below, I don't think this is related.

    This is the UsersMembershipProvider tag prior to the upgrade:

    <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />''
    

    It remains unchanged after the upgrade. I believe that this is the same problem mentioned in this post. I do not have a value for useLegacyEncoding.

    I'm aware that the ticket is marked fixed, but I'm still seeing that issue when performing the upgrade to the newest version (7.4.3) in nuget: enter image description here

    The MachineKey value (I have a validationKey and decryptionKey) is, according to the MSDN Documentation, used to validate forms authentication, and to encrypt and decrypt data.

    Additionally, it seems that if I do not run the site and login before I perform the upgrade via nuget (thus caching login credentials in my browser) I'm prompted to login to authorize the upgrade, which fails with this issue. Remember, I've removed the redirect rules from my web.config, so I do not know how that could be the issue.

    However, manually adding the useLegacyEncoding="true" to the UsersMembershipProvider allows me to login after the upgrade.

    The fact that the UsersMembershipProvider's type isn't being modified makes me suspect that the issue is that the whole tag isn't always correctly being updated/modified by the upgrade process.

    It looks like there are a number of issues with the upgrade not correctly applying certain changes, both to the database (keys not being removed, columns being added too early in the process) and the codebase (the UsersMembershipProvider key in the web.config). Hopefully these details will help anyone else running into these issues, and provide a starting point for the dev team to look into fixing the upgrade package, both in nuget and via the downloadable zip files.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 13, 2016 @ 21:30
    Sebastiaan Janssen
    1

    Okay, so you fixed it by adding useLegacyEncoding="true"?

    I'll look into the config transform and the database upgrade.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 15, 2016 @ 15:34
    Sebastiaan Janssen
    0

    @Ryan:

    Alright, I had a look at this, are you sure that adding useLegacyEncoding="true" fixed the problem? This is the default value if the setting is missing. We don't add or change this setting during upgrades on purpose, we don't want to break people's installs if they've set it to "false".

    Would it be possible for you to get me a backup of your database? Could you email a WeTransfer or Dropbox link at [email protected]? Then I can look into why your database upgrade doesn't work as expected.

    Also, if you can zip up the website and email it me too, I can look at why you explicitly need to add useLegacyEncoding="true".

    Thanks!

  • Angelo 111 posts 260 karma points
    Jul 29, 2016 @ 08:39
    Angelo
    0

    Hello Sebastiaan

    where do you put this set ?

    im stucked with this also ... changed database and ...capuut ... stucked in login window

    https://www.dropbox.com/s/7s256kv3nbdll92/Screenshot%202016-07-29%2009.39.41.png?dl=0

    and error in console ... https://www.dropbox.com/s/xl56xumbe9t14r8/Screenshot%202016-07-29%2009.53.51.png?dl=0

    any solution yet ?

    thank you

    AS

  • Angelo 111 posts 260 karma points
    Jul 29, 2016 @ 18:26
    Angelo
    0

    after all i had the old database :( ...so it worked

    when i tried to change the database same problem trying to migrate to a new database ...

    any solution on this ?

    thank you

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Jul 12, 2016 @ 12:09
    Steve Morgan
    0

    Hi,

    I think I've just had something similar - it was a situation where I wasn't sure of the password.. but what had happened was I'd left open a login screen and stopped the website. It had been down for some time (so any keep alive pings etc would have failed).

    When the site came back up I tried logging in on the tab I'd left open in the browser. It didn't work - until I refreshed the page. It seemed to work - it was replying with incorrect user name / password.

    Had me confused for a good ten minutes. Could this possibly be what everyone is doing? Can this be fixed by having some JS on the login screen hide the login and request the page to be refreshed if the server can't be reached?

    Might be a red herring but it sounds too similar.

    Steve

  • Angelo 111 posts 260 karma points
    Jul 29, 2016 @ 18:32
    Angelo
    0

    Hello Steve ... could you help me ?

    im stuck in login window when i changed the database

    https://www.dropbox.com/s/7s256kv3nbdll92/Screenshot%202016-07-29%2009.39.41.png?dl=0

    and error in console ... https://www.dropbox.com/s/xl56xumbe9t14r8/Screenshot%202016-07-29%2009.53.51.png?dl=0

    Thank you

    Angelo

  • Jeroen Penninx 2 posts 72 karma points
    Aug 01, 2016 @ 06:05
    Jeroen Penninx
    0

    My 5 cents on this rather old topic.

    I too had 400 bad requests, with username and password being sent, but with empty 400 response.

    User has userNoConsole on true, I set it to false. No luck still.

    Did a restart on IIS of the site and a full refresh in the browser and it started working.

  • Mike Rowe 9 posts 109 karma points
    Sep 03, 2016 @ 14:58
    Mike Rowe
    0

    Partial Solution?

    I upgraded from Umbraco 7.4.3 to 7.5.2 using Nuget. I then used Visual Studio's Web Deploy to build and deploy to a localhost install using SQL Server CE 4.0 and to my hosted test environment using Microsoft SQL 2014. In both cases I received "Login failed for user [admin]" when the redirect upgrade was trying to start.

    The solution in my case was to download the Umbraco 7.5.2 zip file and copy the bin, Umbraco and Umbraco_client folder contents to my build environment. After building and deploying, everything is working as it should.

    The only conclusion I can draw is that the Nuget upgrade broke something.

  • Sreeraghavendra Srinivas 3 posts 73 karma points
    Sep 22, 2016 @ 08:46
    Sreeraghavendra Srinivas
    0

    Hi ,

    I have applied the suggestions given above to fix the Bad request error. I am unable to pass through the AuthUpgrade page.

    I think its quite some time this issue was raised and many replies are there over here.

    By any chances the issue has been fixed.

    If yes, can you please update the solution to this?

    Thanks. S.K. Sreeraghavendra

  • Kevin Farrugia 22 posts 54 karma points
    Nov 04, 2016 @ 10:15
    Kevin Farrugia
    0

    I encountered the same issue and tried a number of the above but none were working. The website was also in production (was working fine in staging and development) so re-installing was not an option.

    To debug I was using ARC (or Postman) and posting directly to the login URL, ex:

    URL: https://www.mywebsite.com/umbraco/backoffice/UmbracoApi/Authentication/PostLogin
    
    Headers:
    { Content-Type: application/json }
    
    Payload:
    {"username":"[email protected]","password":"rboj46J1NSyvbZ5c7UI/5+m+Pcc="}
    

    The password used in the example above is the hash equivalent of 'default'. Login would tell me it should be sent in plain-text, but the above worked.

    If the problem exists, you will receive the 400 - Bad Request response and no more info in the response.

    So firstly I set userNoConsole to 0 in the umbracoUser SQL table, but this didn't change anything.

    So I added debug="true" to to get more information on the error.

    I re-sent the POST request and it now works well

    I remove debug="true" and it still works well.

    I cannot understand what was causing the issue (this was working yday but not today), but the above sequence resolve the issue for me.

    Hope it helps someone.

  • Andrew Bright 84 posts 244 karma points
    Jan 27, 2017 @ 13:49
    Andrew Bright
    0

    added debug=true to what please?

  • Mihai Savu 11 posts 75 karma points
    Jan 27, 2017 @ 14:03
    Mihai Savu
    0

    debug=true is a web.config setting that enables Umbraco to display the errors and traces in the webpage.

    <configuration> 
        ...  
        <system.web>  
            <compilation  
                debug="true"  
                ...  
            >  
            ...  
            </compilation>  
        </system.web>  
    </configuration>
    

    In order to have these errors in a webpage, you also need to add the URL parameter ?umbDebugShowTrace=true to that webpage.

  • Andrew Bright 84 posts 244 karma points
    Jan 27, 2017 @ 16:13
    Andrew Bright
    0

    Okay Im having this issue was working fine until last night and have tried all of the above with no luck even went down the forgot password route.

    The site im working on is due to go live monday please help

  • Mihai Savu 11 posts 75 karma points
    Jan 27, 2017 @ 16:35
    Mihai Savu
    0
    • Did you set userNoConsole to 0 in the DB?
    • Did you manually add the useLegacyEncoding="true" to the UsersMembershipProvider in web.config?
    • Are you sure you use the email/username to log in?
    • Did you set the pass hash in the DB?
    • Did you recycle the IIS after any database change?
  • Steve Morgan 1348 posts 4457 karma points c-trib
    Jan 27, 2017 @ 16:37
    Steve Morgan
    1

    Follow Mihai's steps... if all else fails...

    https://our.umbraco.org/projects/developer-tools/umbraco-admin-reset/

    HTH

    Steve

  • Andrew Bright 84 posts 244 karma points
    Jan 30, 2017 @ 11:22
    Andrew Bright
    0

    Okay so this worked:

    https://our.umbraco.org/projects/developer-tools/umbraco-admin-reset/

    How ever when I try to login back in with the correct user details I cant :(

  • Andrew Bright 84 posts 244 karma points
    Feb 22, 2017 @ 21:52
    Andrew Bright
    0

    Okay this is beyond me I basically have to use: https://our.umbraco.org/projects/developer-tools/umbraco-admin-reset/

    Everyday as for some reason the admin keeps changing the username back to Admin which causes the login to fail I dont understand what is causing this?

    Please help

  • Andrew Bright 84 posts 244 karma points
    Feb 24, 2017 @ 13:59
    Andrew Bright
    0

    Okay regarding the above its some weird caching issue where basically after certain amount of time is reverting back to the admin user set by the above mentioned .dll file

  • onurar 11 posts 81 karma points
    Mar 09, 2017 @ 12:48
    onurar
    0

    I am currently developing an Umbraco 7.5.7 site, so I always start the site from within Visual Studio. Database is MS SQL Server 2014. It was working fine yesterday, i.e. I could login to backoffice with my only admin user .

    Read the whole topic, and REALLY tried everything. I am using the "start" button in Visual Studio to start the site. My admin user cannot login but my other user who is not admin can. I get the "400 bad request" response like all the other people here did.

    Both the admin and non-admin users have the same password so their password hash is also the same.

    "userNoConsole" never becomes "1" in my case.

    I tried the "umbraco admin reset" by putting the DLL into the bin folder, stopping/restarting project (making sure IIS Express is also closed and reopened). It is supposed to set the userLogin to Admin and password to Admin1234! . It can change the userLogin to "Admin" but password does not change at all! It remains what it was and I still can't login.

    By the way when I login with my non-admin user, I can change that user's password without any problem. Only thing that is problematic is the user with id=0.

    I even tried to debug the "umbraco admin reset" project but there are no errors, no exceptions are thrown, no errors in UmbracoTraceLog file...

    I have no other option left than dropping and recreating the database from an older backup.

    Edit: I worked the problem around following these steps:

    1) As I said, I had a non-admin user which could login. I set its userType to 1. I noted down its "id" (in my case it was 1).

    2) I opened "umbracoUser2app" table for editing. This table holds information about places each user can access. There were seven lines for user 0 because that user is admin, and two lines for user 1 (namely content and media). I added other app names for 1 as well, so in the end user 1 had the following apps: content, developer, forms, media, member, settings, user.

    3) Now I can login with my other user and access everywhere in the backoffice.

    So if you at least have another user other than the admin, you can follow this approach I suppose. I didn't try creating user manually directly on DB, perhaps it works too. I hope this at least solves some of the problems that we experience until developers can actually reproduce it and find out the real cause.

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Mar 09, 2017 @ 13:04
    Steve Morgan
    0

    Are you using a SQL CE DB in the backend?

    Steve

  • onurar 11 posts 81 karma points
    Mar 09, 2017 @ 13:13
    onurar
    0

    Hi Steve,

    It is MSSQL 2014, I edited my post to reflect this information. I also added a workaround to the post.

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Mar 09, 2017 @ 13:22
    Steve Morgan
    0

    Which two lines were missing for admin - was one of them content?

  • onurar 11 posts 81 karma points
    Mar 09, 2017 @ 13:39
    onurar
    0

    I believe none. Admin (user id = 0) had it all: content, developer, forms, media, member, settings and users. I added those to my other user as well.

  • Marcio Goularte 388 posts 1360 karma points
    Jun 10, 2017 @ 19:06
    Marcio Goularte
    0

    Hello guys. I went through this today. After a period the login has expired. I do not know how in the database the column userNoConsole changed to 1. The solution was to change userNoConsole to 0, reset IIS and recompile. I also had to change the password in the database with the script below:

    UPDATE umbracoUser set userdisabled=0, userLogin='admin', userPassword='bnWxWyFdCueCcKrqniYK9iAS+7E=' where id=0 
    

    Umbraco version 7.6.3 assembly: 1.0.6361.21154

  • Anthony 28 posts 147 karma points
    Jun 16, 2017 @ 10:58
    Anthony
    1

    My turn today. I think I just forgot the password. Anyway, want to add that if you change the password in the database remember new passwords should be 10 characters long (not sure when this change happened). I couldn't get my new password (default) to take so changed it to "defaultpassword" and it worked:

    UPDATE umbracoUser set userdisabled='False', userLogin='admin', userPassword='J9aImlUpv8bmV16JmbZ+Qg==LO2uUwWbriBtClCsaecRYeVPjh7aHMp02unvQQ9ATkQ='where id=0;
    

    Login: admin password: defaultpassword

    Good luck.

  • villagemedia 1 post 72 karma points
    Jun 18, 2017 @ 16:58
    villagemedia
    1

    OK, so I'm new to Umbraco and I had this problem too. Here's where I think the main problem might be.

    When you setup Umbraco in creates a user account with userName = [whatever you put in the username field] and userLogin = [email address]. If you create another user account the userLogin = [whatever you put in the username field], which is not the same as how the initial setup admin user. This means that the initial/admin user will have to use his email address to log in and other users that are added afterwards CANNOT use their email address to login.

    And then to top it off, the user account system does NOT use "OR" to lookup the user. Ideally (in my opinion) there should be unique index on userName, userLogin, and userEmail and then you should be able to use any one of those three to login to your account. Assuming that's not of interest to the primary developers, I think the UI should at least be a little more helpful in helping you know how the data your entering is going to be stored and used during the login process and I think that the behavior should be consistent. If userLogin = emailAddress during initial creation, then make it be the same way when you enter new additional users.

    Now I'm not talking about "membership" here, only backoffice users. I haven't even tested the membership system yet.

  • Bert 128 posts 251 karma points
    Oct 05, 2017 @ 15:10
    Bert
    0

    Just had the same issue.

    • Re-installed Umbraco 2-3 times
    • checked the database over and over
    • looked for https issues

    In the end read this post. Used the email adres and could log in :)

    Might be something the Umbraco UX expert wants to look at...

  • PhamDuoc 1 post 71 karma points
    Jun 23, 2017 @ 07:02
    PhamDuoc
    0

    I had same problem. I logined by email instead of username and I logined successfully

  • Ayo Adesina 445 posts 1059 karma points
    Oct 05, 2017 @ 16:59
    Ayo Adesina
    0

    This is a long thread so I haven't read every single comment so excuess me if what I'm about to say is not relevant.

    The otherday I was installing Umbraco and after entering all the information in to the wizard screen I kept getting Login Failed for umbraco user....

    It was very strange, but it turns out becuase the password to the db connection string had a & in it the umbraco installation failed to read the password in correctly, as soon as the password was changed to one with out a & in it, the error went away.

    Is this a bug in Umbraco? anyone else had anything similar?

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Oct 06, 2017 @ 13:08
    Steve Morgan
    1

    Hi Ayo,

    Not sure that is the bug others are reporting above but it is, indeed, a bug!

    It's already been reported here but I've added some notes now I've recreated it. Might be one we can tackle at the UK Umbraco Festival bug bash.

    http://issues.umbraco.org/issue/U4-9214

    Steve

  • Andrew Bright 84 posts 244 karma points
    Jan 29, 2019 @ 16:22
    Andrew Bright
    0

    I urgently need help with this I have just upgraded to Umbraco 7.13.1 from 7.2.1 following https://our.umbraco.com/documentation/getting-started/setup/upgrading/general and can not login to authorize the upgrade having tried everything below:

    Legacy encoding: https://stackoverflow.com/questions/43947207/umbraco-7-6-1-upgrade-login-issue-400-bad-request

    Changing password settings: https://offroadcode.com/journal/dev-talk/tips-to-login-issues-with-umbraco-upgrades/

    Admin reset: https://our.umbraco.com/packages/developer-tools/umbraco-admin-reset/

    Updating database: UPDATE userNoConsole = 0 etc with no luck

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Jan 30, 2019 @ 07:52
    Steve Morgan
    0

    Are you getting an error - check the dev console.

    Often worth clearing your cookies / trying a fresh browser. Sometimes the user cookies seem to get corrupt on upgrades which stops a login working.

  • Andrew Bright 84 posts 244 karma points
    Jan 30, 2019 @ 10:20
    Andrew Bright
    0

    Error in the dev console is:

    POST http://website.co.uk/umbraco/backoffice/UmbracoApi/Authentication/PostLogin 400 (Bad Request)

    Have tried hard refresh even a different browser and still the same

  • Bert 128 posts 251 karma points
    Jan 30, 2019 @ 09:26
    Bert
    0

    Are you login in through username + password or through email + password? Try both please.

  • Andrew Bright 84 posts 244 karma points
    Jan 30, 2019 @ 10:21
    Andrew Bright
    0

    I have tried both and still the same issue I'm afraid.

  • Steve Morgan 1348 posts 4457 karma points c-trib
    Jan 30, 2019 @ 10:31
    Steve Morgan
    0

    How did you upgrade - nuget or file copy?

    Sounds like you're missing some files!?

  • Andrew Bright 84 posts 244 karma points
    Jan 30, 2019 @ 12:26
    Andrew Bright
    0

    I went for the file copy approach following these instructions: https://our.umbraco.com/documentation/getting-started/setup/upgrading/general

    Copy the following folders from inside the .zip file over the existing folders in your site:

    /bin /Umbraco /Umbraco_Client

    Any file in the /Config folder The /Global.asax file The web.config file in the root of your site (Important: make sure to copy back the version number, and the connection string as they were.) In rare cases, the Web.config file in the Views folder

  • Andrew Bright 84 posts 244 karma points
    Feb 05, 2019 @ 21:49
    Andrew Bright
    0

    Okay so I have gone through the extremes of creating a local version of 7.2.1 both database and files then updated to 7.13.2 using nuget and falling at the same hurdle this is so frustrating surely it shouldnt be this painful.

    Also had this issue https://issues.umbraco.org/issue/U4-9739

    This is the url which looks a bit crazy: http://localhost:/umbraco/AuthorizeUpgrade?redir=%2finstall%2f%3fredir%3dtrue%26url%3dhttp%253a%252f%252flocalhost%253a58238%252f#/AuthorizeUpgrade?redir=%2Finstall%2F%3Fredir%3Dtrue%26url%3Dhttp%253a%252f%252flocalhost%253a58238%252f

    Database user is also fine and doesnt have the userNoConsole issue. Please help

  • Nicola Spurdens 4 posts 74 karma points
    Jul 03, 2019 @ 12:26
    Nicola Spurdens
    1

    This reply on sorted it for me. Wow! https://issues.umbraco.org/issue/U4-4796

    Rasmus Lynggaard 07 Apr 2016, 07:53:04 I encountered the same problem, and it turned out to be a lowercase rule in the IIS URL rewrite module. Umbraco, for some reason, have some casesensitivity. I found a workaround at http://www.wiliam.com.au/wiliam-blog/iis-url-redirects-to-lowercase-and-umbraco-cms

    Excerpt:

    <rules>
          <!-- Redirect rule to force all URLs to lowercase -->
          <rule name="LowerCaseRule" stopProcessing="true">
            <match url="[A-Z]" ignoreCase="false" />
            <action type="Redirect" url="{ToLower:{URL}}" />
            <conditions>
              <add input="{REQUEST_URI}" pattern="^.*/umbraco" negate="true" />
              <add input="{REQUEST_URI}" pattern="^.*/install" negate="true" />
            </conditions>
          </rule>
        </rules>
    
  • Ondřej Kobza 15 posts 96 karma points
    Sep 24, 2020 @ 00:22
    Ondřej Kobza
    0

    You saved my ass! Cheers man

Please Sign in or register to post replies

Write your reply to:

Draft