We have moved to GitHub Issues
Created by Ivan 23 Mar 2014, 20:38:19 Updated by Shannon Deminick 26 Jun 2017, 07:13:12
Is duplicated by: U4-4540
Is duplicated by: U4-5495
On Windows 2008 R2 Server English Culture, Umbraco 7.0.4 works correctly and calling /umbraco/backoffice/UmbracoApi/Authentication/GetCurrentUser returns following data:
In this case, the view returns "remainingAuthSeconds":1101.1718203, so Umbraco 7.0.4 Backend works as expected but in Windows 2008 R2 production server (OS Spanish culture) it returns "SecondsUntilTimeout":1167.5208, instead of "remainningAuthSeconds" and "Culture" instead of "locale".
So after a successful login it throws the following error:
The user object is invalid, the remainingAuthSeconds is required. angular.min.js(63)
And Umbraco 7.0.4 Dashboard is totally broken.
Have you tried clearing your cookies to make sure there's no conflicts?
Hi Sebastiaan, .NET 4.5 is installed on the server and is a new clean Umbraco 7.0.4 installation.
@ivan Hmmm, interesting, it might have something to do with the Spanish locale then, could you attach your log files from App_Data\Logs to this issue. They might contain private information so make sure to set the "Visible to" field to "HQ" instead of "All users" so that only Umbraco HQ gets to see them.
Thanks Ivan! Looking at your logs reminded me of something: is your database user also in the spanish locale? Umbraco needs the database user to be set to English. Could you try and see if that makes a difference please?
Hi Sebastiaan! I have changed database collation to "Latin1_General_CI_AS" and set database user to English. Still same errors.
Hi! Any luck fixing this? I'm running into the same problem. It's on a shared hosting environment, so I can't really check all server settings, but it's a Windows 2012 machine using .NET framework 4.0.30319.18449 (corresponds to the februari update to 4.5.1) and using SQL CE. The hosting provider is Dutch, so it could be culture related
Hi Frank! No luck. I still got the same problem so, in the meantime, I'll just keep using Umbraco 6.
I'm experiencing the same issues. I have full control over the server, and have updated everything on the server (windows 2012). I get the same error on login, and a fresh install just hangs on the first screen... The server is running loads of umbraco 6.x and 4.x sites without issues. I don't think it's a database issue as a fresh install also fails... Server language is set to english and region Denmark.
Attached is Chrome console view of an install (the very first screen) (only visible for HQ)
I think I found the issue! If Helicon Ape (http://www.helicontech.com/ape/) is installed at server/IIS, something makes umbraco 7 break... I tried installing / uninstalling three times just make sure...!
You're totally right Ulrich, Helicon Ape is causing the problem. I just checked both on the shared hosting I was using and in a separate VM. Unfortunately, disabling Helicon Ape through either the Helicon Ape manager or by remove the module in web.config doesn't solve it, only uninstallation...
It looks like this has been solved in the 7.1.1 release. I just upgraded my site from 7.0.4 to 7.1.1 and I can log into the backend without any errors. Nice!
I deploy website to shared web hosting. The server uses Helicon Ape, but I disabled it in my website. The website is developed with .
I have the same problem with Umbraco 7.1.6. and helicon ape installed but disabled on the shared webserver.
The hoster tried to disable it for my site only but this did not help at all. After they completely disabled it on the server I can at least see the login page. But when trying to login I get this error...
Afterwards I can see a blank backend page by hitting refresh in the browser...
(you didn't post the error...)
I can see this error in the console since the Ape module is disabled: "The user object is invalid, the remainingAuthSeconds is required."
As it was still enabled I got an encoding error: ERR_CONTENT_DECODING_FAILED from Chrome
I copied the umbraco files to my local pc and run Umbraco from there - everything works when run locally (database is still remote)!
I noticed that the response from "umbraco/backoffice/UmbracoApi/Authentication/PostLogin" differs when run locally:
on shared webhost: AllowedSections: ["content", "contour", "developer", "media", "member", "settings", "users"] Culture: "en-GB" Email: .. EmailHash: .. Name: "admin" SecondsUntilTimeout: 1200 UserId: 0 UserType: "admin"
locally: allowedSections: ["content", "contour", "developer", "media", "member", "settings", "users"] email: ... emailHash: ... id: 0 locale: "en-GB" name: "admin" remainingAuthSeconds: 1200 userType: "admin"
So on the shared host there's no "remainingAuthSeconds" item but a "SecondsUntilTimeout" item.
How can that be?
Hmm, the most interesting thing I see here is that the casing is different, everything starts with uppercase on your host. No idea how that happens but that could well be the cause of your login problem. I don't have time to investigate today but you should google for that, in the background we're using ASP.NET WebAPI and the json result that we send back should look like the one you see locally.
SecondsUntilTimeout is because you're either properly logged in or not I think so I'm not worried about that one.
Thanks for that hint! This makes it quite clear that it's not an umbraco issue.
I did some googling but I saw nothing that explained the change in casing...
The source of the problem can be found found in a particular assembly installed in the GAC during installation of Helicon Ape: Newtonsoft.Json.dll, version 18.104.22.168. Umbraco 7 also uses Newtonsoft.Json.dll, version 22.214.171.124, deployed in the local bin folder. Because both assemblies share the same version number, the one in the GAC is used by default. Most unfortunately the Newtonsoft.Json.dll used by Helicon Ape is not equipped with certain Convertors: EntityKeyMemberConverter and ExpandoObjectConverter. Umbraco however needs the EntityKeyMemberConverter to read DataMember Name attributes (e.g. [DataMember(Name="remainingAuthSeconds")] ) from certain objects like UserDetail. This Name attribute is used as a 'friendly' name that can be interpreted by client-side code. If the DataMember can't be read because the convertor is missing, the property name (e.g. SecondsUntilTimeout) is used instead. As a consequence client-side rendering gets messed up completely.
In order to solve this problem we need to deploy either a higher version of Newtonsoft.Json.dll in our bin folder or we need to install the original Newtonsoft.Json.dll version 126.96.36.199 in the GAC. Obviously, a version 188.8.131.52 is not yet available. Uninstalling Helicon Ape might also be an option. It has however nothing to do with Spanish culture.
Great work tracking this down!
Helicon Ape should just install an unmodified version of Newtonsoft.Json.dll.
We should be able to just overwrite the dll by installing an original version into the GAC, right? This would be the easiest work-around (beside uninstalling Helicon Ape).
Question is of course if this break helicon ape...
Maybe this page show how to solve the issue: http://www.aip.im/2013/04/how-to-force-iis-asp-net-to-use-assembly-from-the-bin-folder-instead-of-gac/
Now I will try it.
That's a great find, Flavio! I really hope that's going to work. Keep us updated.
I inserted this into web.config
But it did not solve the problem. If I remove the line with
Could not load file or assembly 'Newtonsoft.Json, Version=184.108.40.206, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Umbraco 7 is originally build with a reference to version 4.5. Try this instead:
I guess I will need the version 220.127.116.11 of the dll then...
Will try this.
Then again, maybe in this case the version refers to the file version which should be 18.104.22.16831 for Umbraco 7.1.4 Just take a look at the file properties of Newtonsoft.Json.dll.
I am not saying this will work.. but:
Umbraco 7 is built against json.net v6. You should already have the following in the web.config:
So don't add the codebase. You could try to update it to the minor version in your bin folder, so in 7.1.4 it would be
That's not going to work either. Here newVersion refers to the assembly Version which is set at 22.214.171.124 . See also http://james.newtonking.com/archive/2012/04/04/json-net-strong-naming-and-assembly-version-numbers
Yes, that was HORRIBLE. He's since changed his mind luckily and at least 6.0.2 has assembly version 6.0.0.
None of these seem to work :-( at least for me.
Does somebody has helicon ape installed locally and can test if replacing the dll in GAC works? I guess my hosting provider will not try this for me.
@matthiasbier Did you figure out what exact version is in your bin folder? Maybe try to add the
<codebase> node as well, including the correct version?
In my "bin" the "File version" is "126.96.36.19903", and the "Assembly version is "188.8.131.52".
I was try many combinations. I look that the only configuration that will be compiled is this:
Both configs give me a compiled web site, but the Umbraco Login does not works properly yet. I have the same behavior of start.
Yes, I tried with the AssemblyFileVersion 184.108.40.20603 (Umbraco 7.1.5) but this did not help.
I get two errors on the error page:
[FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=220.127.116.11, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
[FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=18.104.22.16803, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
Seems as if he just ignores the AssemblyFileVersion.
Yeah, don't use the patch version though, just make that 0
Seems very weird that it's looking for 22.214.171.124 though, you're specifically saying: redirect all calls to all versions to 6.0.4. So if it doesn't help with 0 on the end you might have a file in your bin folder that is specifically built against 4.5.0.
It think you can do the following: if you can download json.net with assemblyversion 4.5, throw it in bin\legacy then update your assemblybindings to:
Again, not sure if this will work but I recall some okay experiences with this for HtmlAgilityPack. json.net reference has always been quite more complicated though.
Did so, but he still complains about 126.96.36.199 as before. The second error line is gone now.
I used Json.NET 4.5 Release 11 which has a AssemblyVersion of 188.8.131.52
Can you compare the list of dlls you have in your bin folder to the list of dlls we ship with Umbraco? Curious to see if there's any plugins that rely on json.net 4.5. I can't see why this redirect wouldn't work though.. hmmm
Also you may have a NuGet package overwriting the version in the bin folder maybe? Kinda like this question here: http://stackoverflow.com/questions/11430396/referencing-different-versions-of-json-net-dll
I found that the "umbraco.dll" (version 1.0.5350.25719) uses "Newtonsoft.Json" version 184.108.40.206 and 220.127.116.11.
kind of weird...
Since I'm working via FTP there should be no nuget package involved, right?
@fspezi How do you see that? We only ever reference v6.0.0 and SpecificVersion is set to false.
Here's a screenshot of JustDecompile.
I look this:
Guys, we are running out of options here. It's time to spank that hell-of-an Ape and urge them to solve this blocking issue in their software: http://www.helicontech.com/community/Incomplete_version_of_NewtonsoftJson_installed-8-3279.html?sid=49b172debdcfb9afdcd8739197719be3
Beautiful!! Great job!
Well, they don't seem to care very much about it. When I have time I will try to install it on my PC and then try to replace the GAC ddl with the original one...
Helicon Ape did pick up the message alright. Hopefully next week we can expect a solution:
The following comment was added to ticket [ape-21232] Release 18.104.22.168: Newtonsoft.Json.dll version changed to 6.0.3 -> blocking issue:
Sorry for not getting back to you earlier. Our developers are currently working on this issue and we expect to get the results next week. I'll inform you as soon as we arriva at a solution.
Sorry for inconvenience.
I'm having the same issue, Are you guys 100% if this assembly update will fix it? because I never had Helicon Ape installed and I have checked my gac and do not have newton.soft in there. I'm still puzzled :s
I'm affraid this only solves the problem involving Helicon Ape. Helicon Ape's GAC based version of Newtonsoft.Json is lacking the EntityKeyMemberConverter. However, Umbraco 7.0.4 should have the EntityKeyMemberConverter at its disposal, provided Helicon Ape is not interfering. Obviously with English culture its working so there must be something with Spanish culture that causes the EntityKeyMemberConverter to fail or at least be bypassed. This might indicate a bug in the EntityKeyMemberConverter itself. You'd have to take a closer look at the sources of Newtonsoft.Json and perhaps run some tests to figure out exactly what's going wrong.
I encountered this Helicon Ape conflict earlier in the year ([thread|http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/48023-Unable-to-login-to-back-office-after-deploying-Umbraco-7-to-server]), and the only solution I found was to move my Umbraco 7 sites at a hosting provider that doesn't offer Helicon Ape.
The suggested dependentAssembly\codebase override for Newtonsoft.Json won't work, as according to [MSDN|http://msdn.microsoft.com/en-us/library/yx7xezcf(v=vs.110).aspx], the runtime checks the GAC before probing for the assembly based on the configuration file.
Ok I have done some screen shots now and as you can see I am seeing the same symptoms.
My Umbraco 7.1.6 instance was working fine initially and I was just playing around with with the templates(views), developing in MVC. I am not sure why all of a sudden It doesn't log me in anymore. Keep in mind I did not change any security permissions and everything was working fine. I can now just view the public website I built but not the backoffice. also I do not have Helicon installed.
my defualt culture is set to English. in the webconfig I set Globalization to
I have been fighting this issue for 3 days straight now, searching the net for a solution but nothing yet. I think I might just have to install a new instance. I'm worried this will happen again :s
here is the /umbraco/backoffice/UmbracoApi/Authentication/PostLogin call json response right after I click login allowedSections: [content, developer, media, member, settings, users] email: "email@example.com" emailHash: "11996fb05c18a102f05ab828f7eb9e82" id: 0 locale: "en-GB" name: "Ehsan" remainingAuthSeconds: -0.0560077 userType: "admin"
Thanks for reading.
@Ehsan: This appears to be a different issue. The JSON string returned shows the correct format but your remainingAuthseconds has a negative value, thus forcing you to login again.
@Andrew: you are right. We can't solve the issue in our web.config with an assembly redirect. That's why we're (still) waiting for Helicon Ape to fix it on their side.
Did someone try the new version of helicon ape? http://www.helicontech.com/community/Incomplete_version_of_NewtonsoftJson_installed-8-3279.html
I will urge my Service Provider to do so but I'm not sure how soon they will react...
@Matthias: I tested it yesterday on my local development environment and it works (on my machine)! My hosting provider has already planned an installation for the new Helicon Ape release. Hopefully within a few days I can confirm it also works on a shared hosting machine.
Sorry to all, I know that it is not right but... can I know your providers? I'm using a provider that I are not fully satisfied.
Running Helicon Ape latest version (22.214.171.124) on my production server (Windows 2008 R2 Spanish shared hosting machine). I have installed Umbraco 7.1.8 for testing and everything is working properly.
My Service Provider just told me that they uninstalled helicon ape 1 week ago... But they did not tell me.
I immediately tried to login and it works again.
My hosting provider must have finished installing the new release of Helicon Ape already because my back-end login is up & running again.
@Flavio: I'm using a Dutch provider from the list of recommended hosting providers by Umbraco: http://our.umbraco.org/wiki/install-and-setup/trying-out-umbraco-before-you-install/recommended-hosting-providers.
Great! So I'm wondering, can we close this issue ?
I think this issue can be closed now...
Awesome, good detective work everyone! :)
I'll close this issue now.
@p4persian Did you find a solution to your problem ?
I have a customer with the exact same problem as you. He cannot log in, Helicon Ape is not installed and Newtonsoft.Json is not in GAC.
I don't think that this error has been completely fixed. I am getting the exact same issue, and my setup:
I am getting the same error in all browsers, deleting cookies/cache/etc no joy. The Umbraco log tells me that the user is being logged in correctly. The site worked fine for the first couple of days after install when I was working on it daily, but after not logging in at all yesterday, today I can't get past this error.
On further investigation, it seems that in a moment of exceptional clarity I set the umbracoTimeoutInMinutes app setting to zero. Oops. Resetting it to a positive integer fixes the problem. However, it's still a pretty opaque error that the user gets in this case.
Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/
Backwards Compatible: True
Due in version: