Hello...
When setting up a policy for a SecureContextToken it is possible to ask the
client to refresh the token at certain intervals. By setting the client
timout shorter than the server timeout it is possible to always have a fresh
token in store. However this demands that the clocks on the server and the
client are somewhat synchronised.
Does anyone know if it is somehow possible to tell the clientproxy to
automatically ask for a new SCT when the service sends a SCT timeout message
and automatically resend the failed request again after a new token has been
aquired?
Hi Mirtul,
If you used policy with SecureContextTokens currently, then policy will
take care of automatically re-requesting SCT's for you. By default, there is
a renewalWindowInSeconds which basically tells the policy system that it
needs to renew the SCT when there are only [x] seconds (as specified in the
renewalWindow in the config file) left until the SCT expires.
Usually it is good practice to acquire an SCT before it has already
expired, which is why this support was built in to policy. Optionally, this
can also be accomplished via code by doing:
if( sct.RequiresRenewal )
{
// acquire new SCT
}
Let me know if this answers your question.
Sidd [MSFT]
> Hello...
>
[quoted text clipped - 8 lines]
> and automatically resend the failed request again after a new token has been
> aquired?
Mirtul - 29 Mar 2005 16:44 GMT
Aaah... well... I am using policy files...
I am using the <ttlInsSeconds> to set the renewaltime... did not know that
there was a renewalWindow property. Is there a difference?
I realize now that I erred in my way of thinking. I had some issues with
the client not requesting new SCTs often enough and thought it might be due
to different times on the server side and client side. However, thinking
reasonably now this should not matter as each side should base the span on
its own time. My problem seemed do be due to a WSE2 feature where client
timeout must be set at least 1 minute shorter than the server timeout. With
a 1 minute span between them all works fine.
Anyways, thank you for your help Sidd!
--------
PS. I posted this originally on the MSDN boards... Sheer luck and googling
for another problem had me discover that an answer was posted here. .Net
Monster must have an odd way of working, scraping questions from other
sites without notifying the original poster. :)