locked
How to extend the TransportWithMessageCredential security expiration? RRS feed

  • Question

  • Hello,  I use TransportWithMessageCredential in my WCF.  It seems the soap response token below expires in 5 minutes.  How can I extend it? Thanks a lot.

          <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

             <u:Timestamp u:Id="_0">

                <u:Created>2011-12-25T07:47:23.657Z</u:Created>

                <u:Expires>2011-12-25T07:52:23.657Z</u:Expires>

             </u:Timestamp>

          </o:Security>


    问题要简单,错误须详细@错误/异常/堆栈信息+操作系统+软件版本+all the context of the issue Hope Helpful | http://www.leoworks.net
    Sunday, December 25, 2011 8:28 AM

Answers

All replies

  • Hello, it is not easy to extend. But what's your scenario? When using message security, the client is required to embed the credential in every message sent to the service. So there's no use to extend the expiration time. The next request will contain a new token.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email.
    Sunday, December 25, 2011 1:54 PM
  • Hello,  the wcf client will verify the expiration, and sometimes,  in my scenario, the time clocks of client and server are not synchronized. 
    问题要简单,错误须详细@错误/异常/堆栈信息+操作系统+软件版本+all the context of the issue Hope Helpful | http://www.leoworks.net
    Sunday, December 25, 2011 3:08 PM
  • In this case you need to sync the clocks. Otherwise you will encounter more problems than security token expiration.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    If you have feedback about forum business, please contact msdnmg@microsoft.com. But please do not ask technical questions in the email.
    Monday, December 26, 2011 2:40 AM
  • In custom Binding there is a property called MaxClockSkew.By using it will solve the problem

     

    http://www.danrigsby.com/blog/index.php/2008/08/26/changing-the-default-clock-skew-in-wcf/

    • Marked as answer by Xiaofeng Wang Thursday, December 29, 2011 1:00 AM
    Tuesday, December 27, 2011 8:18 AM