Copied to clipboard

Flag this post as spam?

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


  • Roine Edmundsson 11 posts 31 karma points
    Nov 04, 2011 @ 10:19
    Roine Edmundsson
    0

    Login looping back to login

    Hi, we have deployed a basic page with umbraco. Well 4 pages, but till no massive page with any tweaked functionality.

    Yesterday we published the site to our hosting partner and it works just fine. Though after a while the backend began to throw up login frames. And when login in there it often removed the leftmost pane with the content navigator. Which I found weird but hadn't the time to look at any more due to the ISP at work managed to disconnect our office from the rest of the world.

    Today when I get back to the office I can't log on to the backend at all. It only loops me back to the login page over and over again.

    I found a post here on the forums where they said that it can be the cookies messing it up. So I deleted all cookies and tried again. Didn't solve the issue though.

    I also found a post saying that the tics on one of the user tables had to be higher then the one on the server.

    Anyone else had this problem and can offer a solution? Or anyone that knows what might be going on?

    The site is using an MSSQL CE database and is published with the Microsoft WebMatrix software over FTP.

    Any assistance would be appreciated.

  • Roine Edmundsson 11 posts 31 karma points
    Nov 07, 2011 @ 08:42
    Roine Edmundsson
    0

    No one that got any idea on what this might be caused by and how one would solve this issue? To have a CMS you can't log in to is kind of worthless :/ So with that said I do hope there is someone out there who can have an idea of why this is happening and toss me a solution or some breadcrumbs on where I should go to find the solution to the issues.

  • Roine Edmundsson 11 posts 31 karma points
    Nov 07, 2011 @ 08:56
    Roine Edmundsson
    0

    I should add that I have added users when starting the site locally and then moved the database to the hosting using Microsoft WebMatrix. The new user account is not giving an error when logging on but it redirects to the login page directly. Which means that it shouldn't be something linked to the admin account but rather to umbraco itself and how Umbraco handles the transfer from a localhost environment to a hosting environment.

    Like mentioned before, any asstiance is appreciated.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 08, 2011 @ 12:32
    Tim
    0

    One more thing to check is that the database connection string is OK. If it isn't, you'll never be able to log in. The back office treats it like a failed login, as it can't connect to the database to authenticate, so it fails the login.

    Hope that helps!

  • Roine Edmundsson 11 posts 31 karma points
    Nov 08, 2011 @ 12:37
    Roine Edmundsson
    0

    To my knowledge, when using MSSQL CE you do not have a connection string specified that you can manually edit and configure? Though it might be a misconception from my side that the installation/setup of the CMS configures this.

    And since an MSSQL CE database is just a file in the app_data folder the "connection string" is the same when you run it on localhost or publish it to the ISP.

    Correct me if I am wrong with these assumptions.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 08, 2011 @ 13:12
    Tim
    0

    I think there should still be a connection string in the web.config file, look for "umbracoDbDSN" in the AppSettings section.

    It could also be the permissions, if you've re-uploaded the database since the site was put live, the app pool account might not be able to access the file.

  • Roine Edmundsson 11 posts 31 karma points
    Nov 08, 2011 @ 13:17
    Roine Edmundsson
    0

    The connection string is as follows. 

    <add key="umbracoDbDSN" value="datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\Umbraco.sdf" />

    And when looking at the file through filezilla at the hosting site I get the permissions as 777, which basically means anyone can do anything. Though my assumption here is that there are some permissions that filezilla can't read from the 2008R2 server.

    Though one thing that I did think of now, since all the content on the site is working but the login through the backend isn't there can't be the issue with the database being completely unavailable. Since then it wouldn't be possible to load any content to show the visitors.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 08, 2011 @ 13:24
    Tim
    0

    Odd. Actually it's entirely possible for the database to be unavailable and the front end to still work. Umbraco's content onthe front end is servered from an XML file that's cached in memory. As long as the file doesn't get deleted, the site will still continue to function, even when the database is down. Obviously if you have any user controls etc that talk directly to the database, they won't work, but everything else should carry on working, as long as the "umbraco.config" file is present in the site's "App_Data" folder.

    Do you have remote desktop access to the server that the site is hosted on? It might be worth looking in the error log to see if anything is being logged there if it's throwing an error. If there is an issue with the DB, it'll definitely show up there (and if the problem lies elsewhere there might be some clues). If you haven't got access, you could ask your host to check the logs for you.

    If you download the database from the live site, are you able to open it ok? If so, check the umbracoLog table and see if there's anything going on there.

  • Roine Edmundsson 11 posts 31 karma points
    Nov 08, 2011 @ 13:36
    Roine Edmundsson
    0

    I have no RDP access to the server. Only FTP access, though not a problem to access the DB on the live site through VS2010. Though have to take the site offline while doing so.

    And changes done on localhost can be published to the live site. Though if the cache file is updated locally and then transferred the updates would still transfer to the live site I guess.

    742 0 -1 2011-11-06 11:50:20 Login  
    743 0 -1 2011-11-06 11:50:21 Login  
    744 0 -1 2011-11-06 11:50:28 Login  
    745 0 -1 2011-11-06 11:53:21 Login  
    746 0 -1 2011-11-06 12:12:40 Login  

    Above is the messges from the login attemps that fail. As you can see there is no descriptions there telling what might be the issue. Though the -1 ought to be the return value I guess. And being a negative one I assume it is a bad result.

     

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Nov 08, 2011 @ 14:01
    Tim
    0

    Hmmmmmmm. I'm pretty much stumped. If it works fine locally, but not on live, it must be something to do with the live setup, but I'm not sure what I'm afraid!

  • Roine Edmundsson 11 posts 31 karma points
    Nov 08, 2011 @ 14:05
    Roine Edmundsson
    0

    Yeah, and to make it even more confusing. The day it was put live it worked to log in on the live site. Though you got an inactivity "popup" in the middle of the screen every 5-15 seconds. making it quite useless to work with the backend. And when I returned the day after I just goot looped back to the login screen.

    During the first day after the popup had appeared the content pane, or what the leftmost was called now again, dissapeared. And only a logout/login could solve the isuse. I am quite sure this in some way is correlated, I just have no clue to what it might be or where to start.

  • Roine Edmundsson 11 posts 31 karma points
    Dec 01, 2011 @ 10:09
    Roine Edmundsson
    0

    I am bumping this post, we are still having the same issues and have not found any way to solve them. 

    Help me Obi-One Community, youre my only hope!

    Regards

    Roine

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 19:58
    Gareth Bradley
    0

    +1 one this - I host my own sites on Windows 2008 SBS server and all of them are now showing this symptom!

    A server restart allowed me to login, but showed nothing in the Content tree. Navigating around redirected to the login page...

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 20:12
    Gareth Bradley
    0

    OK - this is getting stranger and stranger. I am finally able to see content, but navigating is still returning me to the login page. I should add, this affects sites ranging from umbraco 3 to 4.7!

    Also, members are still able to login to the frontend site which is working perfectly. The database connections are setup using SQL authentication, and passwords are fine (not expired etc.). Messages are being posted in the umbracoLog table.

    Please help!!! Thanks

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 20:21
    Gareth Bradley
    0

    A little bit more - ASP.NET authentication does not seem to be persisting between page requests. When you move from Content to Settings in the back end, you are redirected to the login page. Once you login and then go back to /umbraco/umbraco.aspx, you will be able to successfully move between Content and Settings.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 19, 2012 @ 20:26
    Jan Skovgaard
    0

    Hi Gareth

    Have you checked that the proper permissions have been set for the network service and iusr on the root folder containing Umbraco?

    Did this issue just start to occur out of the blue or have there been some updates installed on the server?

    /Jan

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 20:33
    Gareth Bradley
    0

    Thanks for the suggestion, alas, the permissions were OK. No change in behaviour.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 19, 2012 @ 20:36
    Jan Skovgaard
    0

    Hi Gareth

    Ok, does the event viewer on the server contain some usefull infomation? Have you also tried to consult the umbracoLog table in the databases to see if it gives a hint?

    /Jan

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 20:42
    Gareth Bradley
    0

    I'm afraid not - nothing useful in either the umbracoLog or Windows Event Viewer...

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 20:43
    Gareth Bradley
    0

    If it helps, I can setup a test site so admins/core team can have a try. Obviously I can't give access to the server though! :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 19, 2012 @ 20:46
    Jan Skovgaard
    0

    Hi Gareth

    This is a long shot...but what does it say in this line in your web.config? <add key="umbracoConfigurationStatus" value="4.7.0" /> does it contain a value or is it empty? (I would be puzzled if it's empty, but let's give it a shot).

    /Jan

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 20:49
    Gareth Bradley
    0

    My test site is a brand new installation - appSettings key contains 4.7.1 as you'd expect. :(

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 19, 2012 @ 20:51
    Jan Skovgaard
    0

    How have you setup the site? As an IIS site or as a virtual directory?

    /Jan

  • Gareth Bradley 30 posts 41 karma points
    Jan 19, 2012 @ 20:52
    Gareth Bradley
    0

    IIS Site using hostname bindings

  • Roine Edmundsson 11 posts 31 karma points
    Jan 20, 2012 @ 09:08
    Roine Edmundsson
    0

    Now that this thread is seeing some life again I thought I would add that the server running our site is a 2008R2 server hosted by a company recommended by Microsoft. So my assumption is that they haven't messed anything up in the configuration of the server. Not sure if this information helps but there you have it. Our problem still persists and we have not been able to find any solution to the issue either.

    So currently we are stuck with me fixing the pages on my laptop, then pushing it to the hosting site where we can no longer login. 

  • Gareth Bradley 30 posts 41 karma points
    Jan 20, 2012 @ 12:55
    Gareth Bradley
    0

    I should have added before, this has started happening recently. In the past, I have always been able to login and work remotely. I am not aware of what's changed in that time, so I can't pinpoint the cause.

    Is there any debug code we can put in to increase the logging?

     

    Thanks

    Gareth

  • Gareth Bradley 30 posts 41 karma points
    Jan 20, 2012 @ 16:16
    Gareth Bradley
    0

    I am able to RDP into the server and log in to Umbraco. That works perfectly...it's like the forms authentication session is lost between page requests when accessing the site remotely. This is actually the first problem I've had with Umbraco, but it's so frustrating! I know it's a server config problem...but how can I identify what?!

    Regards,

    Gareth

  • Gareth Bradley 30 posts 41 karma points
    Jan 23, 2012 @ 15:40
    Gareth Bradley
    0

    Hi,
       This problem is persisting. I have used Fiddler 2 to log the sessions, both with a broken installation from my server, and a working one which resides on a remote server. The broken version constantly refers the browser to logout.aspx which, in turn, redirects to login.aspx. I have downloaded the 4.7.1 source and now going through it to find scenarios where logout.aspx is called.

    I modified UmbracoEnsuredPage.cs to log all exceptions, and it throws:

    System.ArgumentException: The user has no umbraco contextid - try logging in
       at umbraco.BasePages.BasePage.validateUser()
       at umbraco.BasePages.BasePage.ensureContext()
       at umbraco.BasePages.UmbracoEnsuredPage.OnInit(EventArgs e)

    Next, I need to find out what happens with validateUser in BasePage.cs (it looks for a property called umbracoUserContextID, but why that would be empty, I'm not sure...)

    Any core team help?!

    Regards,
    Gareth

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 23, 2012 @ 15:58
    Tim
    0

    @Gareth,

    When you log in to Umbraco, it sets a contextid cookie, that is called something like "UMB_UCONTEXT" that should contain a GUID. If that cookie isn't set, then you won't be able to login to the back office, as the context is used to identify the logged in user. Check that the cookie has been set, if it hasn't, check your cookie settings to see if you're blocking cookies from the site. There should be another cookie called "UMB_PANEL" that has a width and height in as well.

    Check both the working and non-working sites, and see if the cookie is being set. Let me know what you find!

  • Gareth Bradley 30 posts 41 karma points
    Jan 23, 2012 @ 16:03
    Gareth Bradley
    0

    Interesting! On the working version, UMB_UCONTEXT is there on all calls. On the broken server, UMB_UCONTEXT is present on the first page after logging in (e.g. umbraco.aspx) but is lost on all subsequent calls. Interestingly enough though, UMB_PANEL and UMB_UCHK are always present. Why would a single cookie entry be deleted?!

    Thanks for the help!

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 23, 2012 @ 17:16
    Tim
    0

    No worries! That's most odd. Do you have any rules set up in your browsers for cookies from the broken domain, or any domain specific security settings in the browser? Do you get the same issue if you try using a different browser? If not, then it's a specific setting on the browser that you're using, otherwise there must be some other issue, although I've never come across something like this where just one of the cookies is not being set, but the rest are. Let me know how you get on.

    :)

  • Gareth Bradley 30 posts 41 karma points
    Jan 23, 2012 @ 17:37
    Gareth Bradley
    0

    Hi,
       It was actually a friend, who's site I host, who raised awareness of this. Since then, I've tried different browsers, PCs, mobile phones and internet connections. The problem must be with my server, but what could affect Umbraco's cookie like that? I can't even find reference to where the cookie is removed in code...

    Thanks again

    Gareth

  • Gareth Bradley 30 posts 41 karma points
    Jan 23, 2012 @ 18:00
    Gareth Bradley
    0

    I've been hacking away at the code creating my own version of businesslogic.dll and I've found something strange. When the umbracoUserContextID is set, everything is OK. It's then called dozens of times, before eventually returning an empty string. When it returns the empty string, StateHelper.Cookies.HasCookies is true but StateHelper.Cookies.UserContext.HasValue is false. At each debug statement, I'm outputting the stacktrace, but nothing interesting is showing up there. I'll hack about with the StateHelper next and see if that reveals anything...

  • Gareth Bradley 30 posts 41 karma points
    Jan 23, 2012 @ 18:35
    Gareth Bradley
    1

    PROBLEM SOLVED!!!

    I can't take credit - I've just had a text message off the same friend informing me that all emails are going out with the wrong date. I checked the server and sure enough, the date was set to 2012-01-22 instead of 2012-01-23! As the UMB_UCONTEXT cookie has a timeout of 1 day, it was expiring as soon as it was created. All other cookies have a longer expiry.

    Many thanks to everyone for their help! Hopefully the OP can go back to their host and suggest the same resolution?!

    Regards,
    Gareth 

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 24, 2012 @ 10:01
    Tim
    0

    Excellent! Glad you got it sorted.

    :)

  • Roine Edmundsson 11 posts 31 karma points
    Jan 24, 2012 @ 10:06
    Roine Edmundsson
    0

    Was about to say that the time on the server where our site is hosted is correct. Though I did a new attempt to log on to the underlying site and guess what. The problem doesn't persist any longer. Almost makes me wonder if my hosting partner is reading this thread and beat me to it :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 28, 2012 @ 00:37
    Jan Skovgaard
    0

    Hi Gareth

    Happy to see you got it solved and thanks for sharing the solution with all of us. Date issues can be a killer! Will try to remember this info next time I ran into posts with similar issues :)

    Happy umbracoing!

    /Jan

  • DWT 12 posts 32 karma points
    Jul 24, 2015 @ 17:42
    DWT
    0

    Hi guys...I am having this issue. What would be the fix please? :(

  • Gregor Tušar 7 posts 78 karma points
    Feb 28, 2024 @ 12:04
    Gregor Tušar
    0

    I encountered this problem when a setting in appsettings.json was set to localhost, but the code was running on development server, which had a different domain.

    "Umbraco.Cms.Security.AuthCookieDomain":"localhost"

    Because this setting was adding a cookie to a wrong domain the backend never got the authentication cookie back.

    Removing this setting solved the issue.

Please Sign in or register to post replies

Write your reply to:

Draft