PRB - Javascript date picker not working when server time is incorrect
Monday, 11 February 2008
When opening smartDBforms.NET form that contains date fields in edit mode the
javascript date picker does not appear. The following javascript error is
displayed by the browser - Adillis_DateControl is not defined
SYMPTOMS
When opening smartDBforms.NET form that contains date fields in edit mode the
javascript date picker does not appear. The following javascript error is
displayed by the browser -
Adillis_DateControl is not defined
CAUSE
The cause of the error is that ASP.NET throws exception when the browser tries to
download the javascript file, which is stored as a web
resource in the
Adillis.SmartDBForms.dll assembly. This happens when the last modification time
of the assembly is greater than the current server time.
The exception that is thrown when requesting the javascript web resource is:
Specified argument was out of the range of valid values.
Parameter name: utcDate
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Specified argument
was out of the range of valid values.
Parameter name: utcDate
Source Error:
An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
|
Stack Trace:
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: utcDate]
System.Web.HttpCachePolicy.UtcSetLastModified(DateTime utcDate) +3352419
System.Web.HttpCachePolicy.SetLastModified(DateTime date) +47
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +1904
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
|
Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
ASP.NET Version:2.0.50727.1433This is a bug in ASP.NET 2. The
following problem is similar to this issue -
ASP.NET: Web service and time zones problem
RESOLUTION
You can resolve this problem in one of the two ways:
- Correct the server time or adjust it to be after the modification time of the
Adillis.SmartDBForms.dll assembly
- Touch the Adillis.SmartDBForms.dll assembly file in order to change its
modification time to the current server time.
|