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 / May 2005

Tip: Looking for answers? Try searching our database.

New LifeTime(DateTime) ctor: UTC or not?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SA - 05 May 2005 17:40 GMT
Hi all,

Related to William's implementation of a secure context token issuer.

When you are assigning a lifetime object to the SecureContextToken's
LifeTime property like this

Sct.LifeTime = New LifeTime(aDateTimeObject)

Should the datetime be in UTC or local time? I use UTC, but run into
problems. It works for me (on the west side of the prime meridian), but not
for Europeans, which is why I think it is expecting local time.

MSFT: The docs should be more clear on this...

Signature

Sven.

William Stacey [MVP] - 13 May 2005 16:35 GMT
Hi SA.  LifeTime expects a local time as internally it uses DateTime.Now for
compares.  So, IIRC, the SCTNew returns a UTC string that is then converted
to local time before creating the LifeTime object and storing in the new SCT
on the client.  Looking at the code again, it seems as that is what I did on
the client and server methods.  Both client and server use local time in
LifeTime.  But transfers the XMLSCT in a Zulu string to the client, which
the client converts before creating LifeTime.  So you may have modified the
code in such a way as to pass a UTC time in the LifeTime constructor or
there is some funky date issue going on here (i.e. something I missed).  I
hope it is the first case as that should be easy to fix.  If the latter, you
may need to add some debug outputs on both side so we can see the UTC and
the local DateTimes on both sides that are being created/passed.  Please let
me know.  IMO, things like LifeTime should have been UTC based and IsCurrent
and IsExpired could just do the right thing.  Cheers.

Signature

William Stacey, MVP
http://mvp.support.microsoft.com

> Hi all,
>
[quoted text clipped - 11 lines]
>
> MSFT: The docs should be more clear on this...

Rate this thread:







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.