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
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
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.
Copyright (c) Marimer LLC