Copied to clipboard

Flag this post as spam?

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


  • Rune Grønkjær 1371 posts 3102 karma points
    Aug 21, 2013 @ 13:46
    Rune Grønkjær
    0

    Login problems in IE10

    Hi guys,

    I'm having problems with my member login in IE10 on my Umbraco v6.1.1  site. Everything works perfectly in all other browsers including IE9 an lower.

    I'm using a Umbraco base method to log in the users:

    [RestExtensionMethod( returnXml = false )]
        public static void Login() {
    
          HttpContext hc = HttpContext.Current;
          string loginCprno1 = hc.Request.Form[ "loginCprno1" ];
          string loginCprno2 = hc.Request.Form[ "loginCprno2" ];
          string loginPassword = hc.Request.Form[ "loginPassword" ];
          string username = loginCprno1 + loginCprno2;
          if ( ValidateUser( username, loginPassword ) ) {
            FormsAuthentication.SetAuthCookie( username, false );
            //Login success
            HttpContext.Current.Response.Redirect( HttpContext.Current.Request.UrlReferrer.ToString() );
          } else {
            //Login failed
            HttpContext.Current.Response.Redirect( umbraco.library.NiceUrl( 1326 ) );
          }
        }

    I validate the user and then set the authorization cookie.

    Some pages are protected on a member group level and in IE10 I do not get access to these pages and is sent to the login page. umbraco.library:HasAccess(@id, @path) return true in IE10, so it knows that the user is logged in, but it apparently ignores the member groups.

    Any ideas?

    /Rune

  • Ralph van Vugt 57 posts 101 karma points
    Aug 21, 2013 @ 22:34
    Ralph van Vugt
    0

    Hi Rune,

    It's because asp.net doesn't recognize IE10, aka the IE10 postback error. Click for more info.

  • Rune Grønkjær 1371 posts 3102 karma points
    Aug 22, 2013 @ 10:30
    Rune Grønkjær
    0

    Hi Ralph,

    That's a pretty old blog post. Our server have .NET 4.5 installed. You would think MS would have fixed the problem in the meantime??

    /Rune

  • Charles Afford 1163 posts 1709 karma points
    Aug 24, 2013 @ 00:28
    Charles Afford
    0

    Does the code you posted above validate in IE 10?  You mentioned something about the member permissions that is not within the code snippit?  Charlie :)

  • Rune Grønkjær 1371 posts 3102 karma points
    Aug 24, 2013 @ 16:39
    Rune Grønkjær
    0

    The code is pretty standard .NET login stuff, setting a cookie on the client browser. I guess there could be a problem with the cookie en IE10. Question is what, and how to get around it.

    /Rune

  • Charles Afford 1163 posts 1709 karma points
    Aug 24, 2013 @ 20:18
    Charles Afford
    0

    Have you checked fiddler?  Can you see the cookie getting set?  What is the date and exp date of the cookie?  Charlie :)

  • patrick iversen 15 posts 40 karma points
    Nov 08, 2013 @ 09:52
    patrick iversen
    0

    Hit the same sang when a login page was supposed to crate a session cookie and failed in IE10 but worked in everything else. A page suggested installing a hotfix on the server running IIS or added the capabilities tag in /app_browser/forms.browser.

    <browsers>
    <browser refID="Default">
    <capabilities><!-- To avoid wrong detections of e.g. IE10 -->
    <capability name="cookies" value="true" />
    <capability name="ecmascriptversion" value="3.0" />
    </capabilities>
    </browser>
    </browsers>

    Original source:
    http://connect.microsoft.com/VisualStudio/feedback/details/662275/asp-net-user-agent-sniffing-and-ie10-internet-explorer-10

Please Sign in or register to post replies

Write your reply to:

Draft