CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • Csla-4.5.30, PagedList project generating excep. Dataportal_Fetch not implemented.

    rated by 0 users
    Not Answered This post has 0 verified answers | 6 Replies | 1 Follower

    Not Ranked
    14 Posts
    acheema posted on Fri, Oct 11 2013 7:22 PM

    Hi everyone,

    We been using Csla from v2.0 in Web/Windows application. Now we decided to move some of our Web_App use case to Silverlight. We downloaded current 4.5.30 framework version and trying to run PagedList application under silverlight/cs folder. Application got compiled ok, but it is generation exception on line 44  [DalaList.cs  -> DataPortal.BeginFetch<DataList>(new PagedCriteria(0, 10, true), callback);] , as folows

    Csla.DataPortalException: DataPortal.Fetch failed (DataList.DataPortal_Fetch not implemented) ---> Csla.Reflection.CallMethodException: DataList.DataPortal_Fetch method call failed ---> System.NotImplementedException: DataList.DataPortal_Fetch not implemented

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

       at Csla.Reflection.LateBoundObject.<CallMethodTryAsync>d__3.MoveNext()

       --- End of inner exception stack trace ---

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)

       at Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()

       at Csla.Server.SimpleDataPortal.<Fetch>d__7.MoveNext()

       --- End of inner exception stack trace ---

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)

       at Microsoft.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

       at Csla.DataPortal`1.<BeginFetch>d__1e.MoveNext()

    The call is going to ObjectFactory class in PagedListDal.cs or if someone know how to debug the code when running async under background thread. 

    We kind of stuck in between, if some one had got through this exception before or anyone had tested this application before. An early response would be appreciated. 

     

     

    All Replies

    Top 500 Contributor
    35 Posts
    GBE replied on Sat, Oct 12 2013 2:22 AM

    Hi,

    I have not tried to run this specific sample but, from my understanding:

    - does page list contains a DataPortal_Fetch method with a PagedCriteria signature

    - is your client/server settings setup correctly: this method might not be present in the Silverlight code / only available in the server code, and the local portal might be configured.

    Regards,

    Gilles

    Not Ranked
    14 Posts
    acheema replied on Sat, Oct 12 2013 11:32 AM

    Thanks Gillies the response, DataList is configured to use ObjectFactory, DataListDal. Aslo App is configured to use WcfDataPortal and its setting are put in ServiceReferences.clientconfig file. So what i assume, when dp.Beginfetch call starts, it should run on bg thread, and on server side control should move in DataListDal.Fetch method. I also commented out the ObjectFactory attribute, and put my own DataPortal_Fetch method in DataList.server file, but result is the same exception.

    Regards.

    Asad Cheema.

    Not Ranked
    14 Posts

    Also when we debug into Csla code, (line 76-Csla.server.DataPortalSelector - > context.FactoryInfo = ObjectFactoryAttribute.GetObjectFactoryAttribute(objectType);) returning null, even though ObjectFactory attribute is defined as follows in  DataList.cs (in Library.Net)

    #if !SILVERLIGHT
      [Csla.Server.ObjectFactory("DataAccess.DataListDal,DataAccess")]
    #endif 

    So it looks like ObjectFactory Attribute is not reading by the framework correctly, thats why it is looking  local DataPortal_Fetch method.

    Any help to resolve this is appreciated.  Thanks in advance.

    Asad.

    Not Ranked
    14 Posts

    And further debugging the sample app, looks like when bw.RunWorkerAsync(); statement executes, it is still looking DataPortal_XYZ in client's dll i.e. Library.Silverlight. Obviously ObjectFactoery is not defined there.

    Any this we missed in WcfDataPortal configuration to goto Remoteserver?

    Regards.

    Asad Cheema.

    Top 10 Contributor
    2,279 Posts

    Hi,

    Unfortunately this sample hasn't been updated to run in CSLA 4.5.x

    The basic necessary steps to get it running is:

        DataList.cs:

      [ObjectFactory("DataAccess.DataListDal, DataAccess")]
      [Serializable]
      public class DataList : BusinessListBase<DataListDataItem>
    
    App.Xaml

        private void Application_Startup(object sender, StartupEventArgs e)     {       Csla.ApplicationContext.DataPortalProxy = typeof(Csla.DataPortalClient.WcfProxy).AssemblyQualifiedName;       Csla.ApplicationContext.DataPortalUrlString = "http://localhost:29082/WcfPortal.svc";       this.RootVisual = new MainPage();     }
    WcfPortal.cs:
    <% @ServiceHost Service="Csla.Server.Hosts.Mobile.WcfPortal" %>
    web.config
          <service behaviorConfiguration="WcfPortalBehavior" name="Csla.Server.Hosts.Mobile.WcfPortal">         <endpoint address="" binding="basicHttpBinding" contract="Csla.Server.Hosts.Mobile.IWcfPortal">

     

     

     

    Jonny Bekkum, Norway CslaContrib Coordinator

    Not Ranked
    14 Posts

    Thanks jonny, it worked. That App.Xml settings were not there, i was assuming Silverlight will be setting up using ServiceReferences.ClientConfig. 

    Anyway thanks again. I assume same kind of changed will be required to execute other samples too.

    Regards.

    Asad Cheema.

    Page 1 of 1 (7 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems