PortSight Secure Access Documentation

KB-SA-0006-Message Expired occurs on some Web Service Clients



September 1, 2004


Applies to:

Secure Access 2.1 and any later version



Calling AuthenticateUser() method of ARWSClient throws Microsoft.Web.Services.Timestamp.TimestampFault ("Message Expired") error.



The problem is caused by different time settings of each machine (client and server) being different. When WSE serializes the SOAP message, it adds Timestamp elements for created and expires. If the difference in time settings on the server with the web service is longer than the expires - created, you'll get the Message Expired response.


There are two scenarios:

  1. Client sent message to server. Receiving server's Input pipeline checked the timestamp, if it is expired, it will generate Message Expired.
  2. Server reply was delayed but client input pipeline check the timestamp, it will generate MessageExpired exception.

....and there are also two possible solutions for this:

  1. The times need to be synched between client and service servers.
  2. Allow for a large timeout difference. You can do that by increasing TTL value on both client site (ARWSClient.TimeToLive) and server site (Web.Config ?elelement 凷ecureAccessTimeToLive?. Setting TTL to 0 will disable checking timestamps.

I recommend the first solution, i.e. solve it by having each machine synchronized their Date and Time properties.