Hi folks,
This has literally taken me 6 days to resolve, so I thought I'd post what I
did here.
We have a .NET Windows-Forms app that uses WSE2.0 SP1 to communicate with
our web service, however the web service call was failing. IIS logs showed
server 500 errors being generated.
I couldn't find a simple way to log the Exception that was occurring, so I
used the DebugClr.exe app on the server to attach to the process, and then
caught all exceptions. The error:
A first chance exception of type "System.Exception" occurred in
microsoft.web.services2.dll
Additional information: WSE560: An incoming UsernameToken was created too
far in the past to fit within the time windows for replay detection.
Therefore, the token is considered to be invalid.
It turned out that the client machine was 10mins out on its clock, which
caused the above error. Updated the time and it works just fine :) We are
updating our global.asax to log unhandled errors now "just in case". I don't
know if this type of error can be caught in the actual web service code
itself, as it seems this error is caught by WSE before it hits our code.
I couldn't find this error on the web anywhere, so I'm posting it here for
prosperity. Hope it helps someone else!
William Stacey [MVP] - 15 Feb 2005 01:37 GMT
I think the default time differential is 5 mins and can change in the app
config. Glad you found it.

Signature
William Stacey, MVP
http://mvp.support.microsoft.com
> Hi folks,
>
[quoted text clipped - 23 lines]
> I couldn't find this error on the web anywhere, so I'm posting it here for
> prosperity. Hope it helps someone else!
Gavin McKay - 15 Feb 2005 04:05 GMT
Do you happen to know what that app.config setting is? That would be very
handy to know! :)
> I think the default time differential is 5 mins and can change in the app
> config. Glad you found it.
[quoted text clipped - 30 lines]
> > I couldn't find this error on the web anywhere, so I'm posting it here for
> > prosperity. Hope it helps someone else!
William Stacey [MVP] - 15 Feb 2005 04:13 GMT
Sure. Lookup <timeToleranceInSeconds> config element in the WSE docs.

Signature
William Stacey, MVP
http://mvp.support.microsoft.com
> Do you happen to know what that app.config setting is? That would be very
> handy to know! :)
[quoted text clipped - 33 lines]
> > > I couldn't find this error on the web anywhere, so I'm posting it here for
> > > prosperity. Hope it helps someone else!
Gavin McKay - 15 Feb 2005 04:29 GMT
/me smacks head "doh! should have thought of that!"
Thanks for the link :>
> Sure. Lookup <timeToleranceInSeconds> config element in the WSE docs.
>
[quoted text clipped - 47 lines]
> for
> > > > prosperity. Hope it helps someone else!