locked
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:

    <system.identityModel.services>
        <federationConfiguration>
          <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 -->
          <serviceCertificate>
            <certificateReference x509FindType="FindByThumbprint" findValue=""/>
          </serviceCertificate>
        </federationConfiguration>
      </system.identityModel.services>
    

    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 
    <system.identityModel.services>  
        <federationConfiguration>  
            <cookieHandler requireSsl="false" />  
            <wsFederation passiveRedirectEnabled="true" issuer="http://localhost:13922/wsFederationSTS/Issue" realm="http://localhost:28503/" reply="http://localhost:28503/" requireHttps="false" />  
        </federationConfiguration>  
    </system.identityModel.services> 


    There is a start page of WIF
    https://msdn.microsoft.com/en-us/library/hh291066%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

    You can find step by step guide in the reference above for different type of applications like
    https://msdn.microsoft.com/en-us/library/hh291061(v=vs.110).aspx

    Best regards,

    Kristin


    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