There is a time and/or date difference between the client and server.
- From: marvinbaby@xxxxxxxxx
- Date: Fri, 01 Jun 2007 23:03:31 -0000
Here's an error i get. I have IIS6 and Sql Server 2000 on different
machines both running wk2003. I'm using Intergrated Windows
Authentication. here's an error Id get.
System.Security.SecurityException: There is a time and/or date
difference between the client and server.
at System.Security.Principal.WindowsIdentity.KerbS4ULogon(String
upn)
at System.Security.Principal.WindowsIdentity..ctor(String
sUserPrincipalName, String type)
at System.Security.Principal.WindowsIdentity..ctor(String
sUserPrincipalName)
at Mckinstry.HumanResources.PersonnelInformation..ctor(String
NetworkLogin) in C:\Documents and Settings\marvinm\My Documents\Visual
Studio 2005\Projects\HumanResources\PersonnelInformation.cs:line 26
at HumanResourcesService..ctor()
Here is a piece of code i use to pass the orginal caller token to the
datbase server.
int slash = NetworkLogin.IndexOf("\\");
if (slash > 0)
{
string domain = NetworkLogin.Substring(0, slash);
string user = NetworkLogin.Substring(slash + 1);
NetworkLogin = user + "@" + domain;
}
// The WindowsIdentity(string) constructor uses the new
// Kerberos S4U extension to get a logon for the user
// without a password.
WindowsIdentity wi = new WindowsIdentity(NetworkLogin);
WindowsImpersonationContext wic = null;
try
{
wic = wi.Impersonate();
// Code to access network resources goes here.
whileLoad(pi.dbGetPersonnelInformation());
}
catch(Exception e)
{
throw new Exception(e.ToString());
}
finally
{
// Make sure to remove the impersonation token
if( wic != null)
wic.Undo();
}
.
- Follow-Ups:
- Prev by Date: Re: LDAP Bind to ADAM user - bad-pwd-count not being set.
- Next by Date: Re: There is a time and/or date difference between the client and server.
- Previous by thread: Re: Urgent: Securing a .net 1.1 application
- Next by thread: Re: There is a time and/or date difference between the client and server.
- Index(es):
Relevant Pages
|