Friday, February 10, 2012
Support » Support Forum
Register Login
HomeWhat is NDO?- Executive Overview- NDO for DevelopersHow NDO Works- Persistent Classes- Mapping- Queries- Reverse Engineering- Inheritance, Polymorphism- Distributed ApplicationsLicensingSupport- Support Forum- FAQ- Solutions- Downloads- E-Mail Support- Tutorial VideosOnline ShopContact
Welcome to the NDO support forum!
Please register/login at the site if you want to post a thread. We sometimes copy support mails of common interest to the forum. They appear with anonymous sender. Please post your messages in English language if possible. You can do your posts also in German, we will translate your post and our answer so that all users of the forum can read your posts. The forum software requires that javascript is enabled. Please do not insert licence information or licence keys in forum posts. If you know a good answer to a post of another user, feel free to reply! The forum is monitored. We reserve the right to remove posts we consider not to be useful for other forum users.
I am currently evaluating NDO for use on a project. I worked through the first tutorial with only minor problems (I happen to have .NET 1.1 and .NET 2.0 installed on the same machine, and had fun making .config files). Now I am trying to overlay NDO on top of an existing code base.
My app is an ASP.net web app. The code is split into many projects, including one called BusinessObjects and one called wwwroot. I used the NDO toolbar to configure both of these projects - BusinessObjects as a library, wwwroot as an application. In the web app's BeginRequest, I try to construct a PersistenceManager. When I do that, I get the error at the bottom of this post. Is this something to do with an expired license? I am using the demo version, but have only had it installed for 2 days. Or is something else wrong? Thanks!
[NDOException: Persistence manager initialization error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Type constructor threw an exception. ---> System.Exception: NDO version expired. at System.Collections.ArrayList..ctor() at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess) at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at NDO.s.b(String A_0) at NDO.Mapping.NDOMapping..ctor(String mappingFile) at NDO.ac..ctor(String A_0, Type A_1) at NDO.PersistenceManagerBase.Init(String mappingFileName) at NDO.PersistenceManager.Init(String mappingFileName) at NDO.PersistenceManagerBase..ctor(String mappingFile) at NDO.PersistenceManager..ctor(String mappingFile) at ******.Global.Application_BeginRequest(Object sender, EventArgs e) in c:\******\******\development\wwwroot\global.asax.cs:line 65 at System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) at System.Web.HttpApplication.ResumeSteps(Exception error) at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) at System.Web.HttpRuntime.ProcessRequest(HttpWorkerRequest wr) at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) --- End of inner exception stack trace --- at System.Collections.AlFactory.SetListType(Type listType, Guid guidToCompare) --- End of inner exception stack trace --- at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess) at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at NDO.s.b(String A_0) at NDO.Mapping.NDOMapping..ctor(String mappingFile) at NDO.ac..ctor(String A_0, Type A_1) at NDO.PersistenceManagerBase.Init(String mappingFileName) at NDO.PersistenceManager.Init(String mappingFileName)] NDO.PersistenceManager.Init(String mappingFileName) +393 NDO.PersistenceManagerBase..ctor(String mappingFile) +63 NDO.PersistenceManager..ctor(String mappingFile) +378 ******.Global.Application_BeginRequest(Object sender, EventArgs e) in c:\******\*******\development\wwwroot\global.asax.cs:65 System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87
Hi,
it seems, as if your NDO version is expired. This may happen, if you install NDO more than 30 days after the download. Use the EMail Support function of our site to send me your EMail address. I'll send a new key to you and a short description, how to install the key.
Best Regards:Mirko
The exception seems to come from the line in which I construct a PersistenceManager. In the tutorial app, the PersistenceManager is constructed with 0 arguments. In my code, when I tried that version of the constructor, I got the following error:
[NDOException: Can't determine the path of the entry assembly - please pass a mapping file path as argument to the ctor of PersistenceManager.] NDO.PersistenceManagerBase..ctor() +317 NDO.PersistenceManager..ctor() +373 ******.Global.Application_BeginRequest(Object sender, EventArgs e) in c:\******\******\development\wwwroot\global.asax.cs:65 System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87
Presumably, this is because the working directory for the aspnet_wp.exe process is C:\WINDOWS\system32\. In any case, I then tried passing in the path like this:
manager = new PersistenceManager("C:\\******\\******\\development\\wwwroot\\bin\\NDOMapping.xml");
And that is when I got the original "NDO version expired" exception. Could the problem be related to the fact that that I had to manually specify a mapping file?
Hi, the message indicates clearly, that the NDO Licence Key isn't valid anymore. I sent a key to your EMail address.
As for the web applications: Yes, it's the right way to use the PersistenceManager constructor parameter. Normally you'd determine the path to the mapping file using the Request.MapPath method.
Please get back to me, if NDO doesn't work with the new key.
Best Regards: Mirko
I tried using the new key, and I also tried uninstalling and re-installing NDO with the new key. In both cases, the tutorial works fine. However, in my application, I keep getting the "NDO version expired" exception.
I noticed that, after recompiling my app, I am always able to hit one page. However, the page doesn't have stylesheets, images, or anything else. After that, I can't hit any page (always getting the "NDO version expired" exception). Presumably, the first request after starting the application succeeds. This would be the request that gets the HTML. Further requests, like requests for CSS and images, fail.
I moved the code that creates a PersistenceManager from Application_BeginRequest to Application_Start (so that it only ever creates 1 instance of PersistenceManager... not what I want in the long haul). This allows me to hit many pages without any problem. However, when I finally hit a page that attempts to create a Query object, I hit a similar exception.
Line 30: ArrayList refs = new ArrayList(); Line 31: Line 32: Query q = s_persistenceManager.NewQuery(typeof(ExecutionEvent)); Line 33: IList events = q.Execute(); Line 34: foreach (ExecutionEvent e in events)
[Exception: NDO version expired.□□□□□□□□□□□□] [Exception: Type constructor threw an exception.] System.Collections.AlFactory.SetListType(Type listType, Guid guidToCompare) +783 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess) +0 System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean verifyAccess) +320 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +23 System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) +1671 NDO.s.b(String A_0) +145 NDO.Query..ctor(Type A_0, String A_1, Boolean A_2, ac A_3, Language A_4) +236 NDO.PersistenceManager.NewQuery(Type t, String expression, Boolean hollow) +43 NDO.PersistenceManager.NewQuery(Type t) +11 Ema.ExecutionEventManager.GetAll() in c:\tx2\ema\development\wwwroot\executioneventmanager.cs:32 Ema.ClosingAgenda.get_executionEventInitialization() in C:\TX2\EMA\development\wwwroot\ClosingAgenda.aspx.cs:75 ASP.ClosingAgenda_aspx.__DataBind__control8(Object sender, EventArgs e) in C:\TX2\EMA\development\wwwroot\ClosingAgenda.aspx:68 System.Web.UI.Control.OnDataBinding(EventArgs e) +66 System.Web.UI.Control.DataBind() +26 System.Web.UI.Control.DataBind() +86 System.Web.UI.Control.DataBind() +86 System.Web.UI.Control.DataBind() +86 TernaryTemplates.TemplatedControl.DataBind() in C:\TX2\EMA\development\TernaryTemplates\TemplatedControl.cs:93 System.Web.UI.Control.DataBind() +86 Ema.ClosingAgenda.Page_Load(Object sender, EventArgs e) in C:\TX2\EMA\development\wwwroot\ClosingAgenda.aspx.cs:102 System.Web.UI.Control.OnLoad(EventArgs e) +67 System.Web.UI.Control.LoadRecursive() +35 System.Web.UI.Page.ProcessRequestMain() +750