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
  • Need help for MobileProxy Configuration

    rated by 0 users
    Answered (Not Verified) This post has 0 verified answers | 2 Replies | 0 Followers

    Top 500 Contributor
    30 Posts
    HK.Lee posted on Thu, May 28 2015 10:42 AM

    Hi All,

    In my WPF project with CSLA v 4.70, I configured mobileProxy same with Project tracker .

    However, when I try to fetch some simple readonly list, Dataportal_fetch has never been touched.

    On debugging, error was fired at following line of fetch method of mobileproxy.cs.

    #if !NET40
              response = await proxy.FetchAsync(request).ConfigureAwait(false);
    #else

    and  stack trace shows

    Csla.DataPortalClient.MobileProxy.<Fetch>d__8.MoveNext() file d:\DotNetApps\CNS\Source\Business\Csla\Csla\DataPortalClient\MobileProxy.cs:line 327

    and inner error message says ' returned internal server error 500..'

    I tried both calling method of  async and callback fetch, but had same error.

       CNS.Business.Entity.LineProcessInfoList.GetLineProcessInfoList(new Business.Entity.LineProcessCriteria(true, 1), (o, args) =>
                {
                    if (args.Error == null)
                        lines = args.Object;
                });

     var list = await CNS.Business.Entity.LineProcessInfoList.GetLineProcessInfoListAsync(new Business.Entity.LineProcessCriteria(true, 1));

    Pls give me any advise what I missed or share your experience. Following is each config.

    app.config

      <appSettings>
        <add key="CslaDataPortalProxy" value="Csla.DataPortalClient.MobileProxy, Csla"/>
        <add key="CslaDataPortalUrl" value="http://localhost:3969/slPortal.svc"/>
      </appSettings>

    web.config

     <appSettings>
        <add key="CslaAuthentication" value="Csla" />
      </appSettings>
      <system.serviceModel>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
        <services>
          <service name="Csla.Server.Hosts.WcfPortal" behaviorConfiguration="returnFaults">
            <endpoint binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IWcfPortal"
                      contract="Csla.Server.Hosts.IWcfPortal" />
          </service>
          <service name="Csla.Server.Hosts.Mobile.WcfPortal" behaviorConfiguration="returnFaults">
            <endpoint binding="basicHttpBinding" bindingConfiguration="basicHttpBinding_IWcfPortal"
                      contract="Csla.Server.Hosts.Mobile.IWcfPortal" />
          </service>
        </services>
        <bindings>
          <basicHttpBinding>
            <binding name="basicHttpBinding_IWcfPortal" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647"
                     maxBufferSize="2147483647">
              <readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647"
                            maxNameTableCharCount="2147483647" maxDepth="2147483647" />
            </binding>
          </basicHttpBinding>
          <wsHttpBinding>
            <binding name="wsHttpBinding_IWcfPortal" maxReceivedMessageSize="2147483647">
              <readerQuotas maxBytesPerRead="2147483647" maxArrayLength="2147483647" maxStringContentLength="2147483647"
                            maxNameTableCharCount="2147483647" maxDepth="2147483647" />
            </binding>
          </wsHttpBinding>
        </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="returnFaults">
              <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
          </serviceBehaviors>
        </behaviors>

    Any advice would be highly appreciated.

    TIA

    HK.Lee

     

     

    All Replies

    Top 500 Contributor
    30 Posts
    HK.Lee replied on Fri, May 29 2015 3:42 AM

    I found I missed to set Csla.ApplicationContext.User on debug as diffrently with silverlight, so added

    Csla.ApplicationContext.User = new Csla.Security.UnauthenticatedPrincipal();

    at bootstrapper,however it shows another error at wcf channel's response.

    When I remove all settings of system.web at web.config, it runs fine.

    I didn't dig in which setting has an influene but now it's solved.

    Pls refer if anyone who has same trouble like me.

    HK.Lee

     

    Top 10 Contributor
    2,279 Posts
    Suggested by Andy

    Hi,

    It is a matter of configuration error in your web.config.

    MobileProxy on the client is NOT compatible with WcfProxy on the serverside. You must use the corresponding MobilePortal on the server  to make it work or use the WcPortal on the client. 

    Jonny Bekkum, Norway CslaContrib Coordinator

    Page 1 of 1 (3 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