1

I am using following peace of code to issue a security token by STS using UserNameWSTrustBinding. This code works fine if the client datetime meet the default 5 min skewclock. What shall I do to increase this time span to mend the situation for other clients with non-synced date & time of STS.

 var credentials = new ClientCredentials();
        credentials.UserName.UserName = "username";
        credentials.UserName.Password = "password";

        var stsAddress = System.Configuration.ConfigurationManager.AppSettings["ida:STSAddress"];
        var realm = System.Configuration.ConfigurationManager.AppSettings["ida:Realm"];

        var token = WSTrustClient.Issue(
            new EndpointAddress(stsAddress),
            new EndpointAddress(realm),
            UserNameWSTrustBinding(SecurityMode.TransportWithMessageCredential), 
            credentials);

        return token.ToTokenXmlString(); 

I followed the instructions from the link bellow but it didn't solve the issue. https://msdn.microsoft.com/en-us/library/aa738468(v=vs.110).aspx

Arman Hatefi
  • 43
  • 1
  • 8

0 Answers0