Why did ACS suddenly stop redirecting user back to the previous page after signin?

Answered Why did ACS suddenly stop redirecting user back to the previous page after signin?

  • 22 марта 2012 г. 16:12
     
     

    I'm using a custom login page based almost verbatim on the code from the sample at http://msdn.microsoft.com/en-us/library/hh127794.aspx (I changed the buttons to <a> tags in the server-side partial view and removed the jQuery bits, and did some refactoring of the server-side classes, but that was it). For a while it was working, as expected, but now ...

    I try to load /Account/Index (protected by [RequireAuthentication]) - the login page appears as expected, I choose a provider and sign in, and now I then get redirected to the homepage (/). This just suddenly started happening, and all I've been able to figure out is that now the post to /Account/SignIn no longer has the request header "wctx" with the original URL. Stopping my application to run the sample application on the same port (i.e. connecting to Azure in the same way) works, so the problem is somewhere in my code, but I have no idea where. What caused this, and how do I restore the original redirect behavior?

    UPDATE: I went through the requests back and forth line-by-line, and I can't find anywhere that the sample application behavior differs from my application, until the request to /Account/SignIn: The sample has wctx set in the request headers, and mine doesn't.
    • Изменено Ted Driggs 22 марта 2012 г. 16:48
    •  

Все ответы

  • 23 марта 2012 г. 10:08
     
     

    Hi,

    If you create your own Azure sample with this ACS as the identity provider, can you find the "wctx" in request header?

    Do you ever modify the rules of the ACS Management portal?

  • 25 марта 2012 г. 16:25
     
     

    Hi,

    If you create your own Azure sample with this ACS as the identity provider, can you find the "wctx" in request header?

    Do you ever modify the rules of the ACS Management portal?

    The wctx header appears in the sample app's request to /Account/SignIn but not to mine. They connect to the same thing in the ACS management portal, so no rules can be different between the two.
  • 29 марта 2012 г. 16:16
     
     Отвечено
    Make sure that you have set the Return URL correctly in your "Relying Party Applicaction Settings" on ACS.
  • 9 апреля 2012 г. 21:23
     
     
    I do have that set properly - pointing the sample app at my ACS configuration from my machine works perfectly.