Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

HOWTO: Debug UsernameToken problems on a server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gavin McKay - 14 Feb 2005 23:09 GMT
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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.