Copied to clipboard

Flag this post as spam?

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


  • Daniël Tulp 33 posts 64 karma points
    Nov 07, 2013 @ 17:06
    Daniël Tulp
    0

    Can't login anymore, keep getting redirected back to login.aspx page

    Hi,

    using umbraco 6.1.6

    after nog using the backend of our umbraco website for a few months I started developing for our website again. As the website was being used by some people, I decided to use a staging environment. So I moved all my files and finally got the database also cloned.

    But now whenever I try to login to the backend of umbraco (in the live and the staging environment) I get a javascript error in my firebug console:

    {"Message":"The user has no umbraco contextid - try logging in","StackTrace":"   at Umbraco.Web.Security.WebSecurity.ValidateCurrentUser(HttpContextBase httpContext, Boolean throwExceptions)\r\n   at Umbraco.Web.Security.WebSecurity.AuthorizeRequest(HttpContextBase httpContext, Boolean throwExceptions)\r\n   at Umbraco.Web.WebServices.UmbracoAuthorizedWebService.AuthorizeRequest(Boolean throwExceptions)\r\n   at Umbraco.Web.WebServices.UmbracoAuthorizedWebService.AuthorizeRequest(String app, Boolean throwExceptions)\r\n   at umbraco.presentation.webservices.TreeClientService.GetInitAppTreeData(String app, String treeType, Boolean showContextMenu, Boolean isDialog, TreeDialogModes dialogMode, String functionToCall, String nodeKey)","ExceptionType":"System.InvalidOperationException"}
    

    As suggested in other posts, I delete my cookies and try again, but no luck.

    I also get some other errors from time to time:

    uiKeys is undefined

    I uploaded my umbraco/config/lang folder using Binary, but I still get the error sometimes

    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    I added this to my web.config

    <pages enableEventValidation="false" validateRequest="false" viewStateEncryptionMode ="Never" />
    

    and the error seems gone

    I have been at this for several hours and can't seem to fix it.

    Locally loggin in works.

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Nov 07, 2013 @ 17:10
    Ali Sheikh Taheri
    0

    Hi Daniel,

    the first thing I would check is the connection string. make sure that it is right on the staging.

    the content is being loaded from XML file so no need to connect to db, that's why you could see the content and cannot login to backend.

    I've had that problems so many times and it was always the connection string in web.config was not right.

    Cheers

    Ali

  • Daniël Tulp 33 posts 64 karma points
    Nov 08, 2013 @ 09:15
    Daniël Tulp
    0

    That would have been an easy fix, but alas, the string is correct and it has worked in the past on the live environment, the string hasn't changed.

  • Daniël Tulp 33 posts 64 karma points
    Nov 11, 2013 @ 16:01
    Daniël Tulp
    0

    I was able to fix this. The reason that I couldn't login was that my UMB_UCONTEXT cookie wasn't being created becayse I fixed the error

    Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

    the wrong way.

    As http://adam.kahtava.com/journal/2009/11/23/how-to-fix-the-validation-of-viewstate-mac-failed-error-aspnet-mvc/ shows I needed to create a random machinekey and add it to my web.config

Please Sign in or register to post replies

Write your reply to:

Draft