This project is read-only.

Cannot bind member, DateTime, on object Microsoft.Scripting.ScopeStorage

Aug 21, 2012 at 4:54 PM
Edited Mar 12, 2014 at 8:14 PM
When using DateTime it thrown a Missing Member Exception. A little help please. I'm a noob to the DynamicMetaObj. I did do an Imports System at the top of my asp page. Then i did a Dim TodaysDate = new DateTime() cannot bind member, DateTime, on object Microsoft.Scripting.ScopeStorage

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.MissingMemberException: cannot bind member, DateTime, on object Microsoft.Scripting.ScopeStorage

Stack Trace: [MissingMemberException: cannot bind member, DateTime, on object Microsoft.Scripting.ScopeStorage] CallSite.Target(Closure , CallSite , IDynamicMetaObjectProvider ) +453 System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +438 lambda_method(Closure , VBScript , IDynamicMetaObjectProvider ) +46682 Dlrsoft.VBScript.Hosting.VBScriptCode.Run(Scope scope) in C:\Users\me\Downloads\aspclassiccompiler-52c2ef825360\aspclassiccompiler_52c2ef825360\ProjToNet\VBScript\hosting\VBScriptCode.cs:55 Microsoft.Scripting.Hosting.CompiledCode.Execute(ScriptScope scope) +75 Dlrsoft.Asp.AspHandler.ProcessRequest(HttpContext context) in C:\Users\me\Downloads\aspclassiccompiler-52c2ef825360\aspclassiccompiler_52c2ef825360\ProjToNet\asp\AspHandler.cs:118 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75  
Aug 16, 2013 at 1:48 PM

Were you ever able to figure out the problem / solution here.

I ran into similar issue today and looking for assistance.

Mar 12, 2014 at 8:04 PM
Nope. Wasn't able to figure it out. Anyone else out there. Help us. Please.
Mar 13, 2014 at 5:45 AM
The reason that it did not work is DateTime is a value time. If you do DateTime dt = new DateTime() in c#, you will get 1/1/0001 12:00:00 AM. I suggest you to use System.DateTime.Now or System.DateTime.Today. The following code should work:

imports system

dim dt = System.DateTime.Now
response.write dt.toString()