Hi Sebastian,
Concerning javascript :
Nothing special, except an ajax call :
""function ServerTime() {"
+ " var timeserver = null;var time = null;"
+ "$.ajax({url: '" + result + "',"
+ " async: false, dataType: 'text',"
+ " success: function(text) {"
+ " time = new Date(text);"
+ " }, error: function(http, message, exc) {"
+ " time = new Date();"
+ "}});"
+ "return time;}""
and this response :
Response.AddHeader("Cache-Control", "no-cache, must-revalidate"); // HTTP/1.1
Response.AddHeader("Expires", "Fri, 1 Jan 2010 00:00:00 GMT"); // Date in the past
Response.AddHeader("Content-type", "text/plain");
int offset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).Hours;
string timeZone = "+" + offset.ToString().PadLeft(2, '0');
if (offset < 0)
{
int i = offset * -1;
timeZone = "-" + i.ToString().PadLeft(2, '0');
}
String datetime = DateTime.Now.ToString("MMMM d, yyyy HH:mm:ss ") + timeZone.PadRight(5, '0');
Response.AddHeader("Content-length", datetime.Length.ToString());
Response.Write(datetime);
Do you think it can be the problem ? Is there any difference between the authentification cookies or javascript mechanism from an admin and host side ?
thank you