I have just tried to upgrade to version 4.1.3 of serviceBus and now my SAS generated token's fail. I am using these tokens to connect with a WCF relay in servicebus.
The error I get is "Time-out interval must be less then 2^32-2"
The token's definitely work on the version 3.4.3.
When I generate the token I was calculating a timeToLive of between 1970 and the year 3000. I believe this is my issue as if I set this to a low value I can generate new tokens that work (10 days). This will not work for me because I need tokens that will not expire.
Does anyone now how the timeToLive works. What is the maximum value and if there is any work-around where I can continue to use my SAS tokens. They have been generated and are in the field - so re-generating them will be difficult.
The code I am using is below:
Dim TimeToLive = TimeSpan.FromDays(365) 'This will fail
Dim serviceUri = ServiceBusEnvironment.CreateServiceUri("https",
serviceNamespace,
servicePath).ToString().Trim("/")
Dim sasKey As String = SharedAccessSignatureTokenProvider.GetSharedAccessSignature(
SharedAccessKeyName,
SharedAccessKeyPrimary,
serviceUri,
TimeToLive)
the generated sasKey will fail when it is used. if I set the TTL to 10 days it would work.
Thanks for your help