Setting the "return URL" with WIF. RRS feed

  • Question

  • Hi,

    I need to build a client to a IDP, so I'm using the WIF components.
    I saw that I should configure my web.config with this section:

          <cookieHandler requireSsl="false" />
          <wsFederation passiveRedirectEnabled="true" issuer="http://stubidp.kentor.se" realm="http://localhost:26756/" reply="http://localhost:26756/" requireHttps="false" />
          <!-- If installing SSO on a load-balanced server or cloud environment, specify for findValue the same thumbprint as the trustedIssuers. This will enable RSA cookie encryption instead of DPAPI, thus bypassing the cookie size limit -->
            <certificateReference x509FindType="FindByThumbprint" findValue=""/>

    Where my stub IDP in this case is: http://stubidp.kentor.se
    When I redirect to this IDP like so:

    FederatedAuthentication.WSFederationAuthenticationModule.RedirectToIdentityProvider("http://stubidp.kentor.se/Metadata", "http://localhost:26756/user", true);

    It works fine and I see the IDP's login screen, but I don't know how I can tell it the url to redirect the user when he logs in.

    Can anyone help me?
    (Also, is there a tutorial for WIF somewhere?)

    thanks :)

    • Edited by Number 2 Thursday, February 2, 2017 7:10 AM
    Thursday, February 2, 2017 7:10 AM

All replies

  • Hi

    You may need to add a config section like bellow 
            <cookieHandler requireSsl="false" />  
            <wsFederation passiveRedirectEnabled="true" issuer="http://localhost:13922/wsFederationSTS/Issue" realm="http://localhost:28503/" reply="http://localhost:28503/" requireHttps="false" />  

    There is a start page of WIF

    You can find step by step guide in the reference above for different type of applications like

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Kristin Xie Tuesday, February 14, 2017 2:42 AM
    Friday, February 3, 2017 3:14 AM