WCF Problem
Old forum URL: forums.lhotka.net/forums/t/4023.aspx
Yuhnke posted on Tuesday, December 11, 2007
I have successfully implemented a client application using a csla library with remoting(Listener Service not IIS).
I am running in to a problem when trying to change the application over to WCF.
I have changed my client config to :
<appSettings>
<add key="CslaAuthentication" value="Csla"/>
<add key="CslaDataPortalProxy" value="Csla.DataPortalClient.WcfProxy, Csla"/>
<add key="CslaSerializationFormatter" value="NetDataContractSerializer"/>
</appSettings>
<system.serviceModel>
<client>
<endpoint name="WcfDataPortal"
address="net.tcp://blabla.blah:32784/WcfHost/WcfPortal.svc" binding="netTcpBinding"
contract="Csla.Server.Hosts.IWcfPortal"/>
</client>
</system.serviceModel>
I have changed my server config to :
<configuration>
<system.serviceModel>
<services>
<service
name="Csla.Server.Hosts.WcfPortal"
behaviorConfiguration="metadataSupport">
<host>
<baseAddresses>
<add baseAddress="net.tcp://blablablah:32784"/>
</baseAddresses>
</host>
<endpoint name="WcfDataPortal"
address="net.tcp://blablablah:32784/WcfHost/WcfPortal.svc"
binding="netTcpBinding"
contract="Csla.Server.Hosts.IWcfPortal"/>
</service>
</services>
</system.serviceModel>
<appSettings>
<add key="CslaAuthentication" value="Csla"/>
</appSettings>
I am getting an error in the proxy.Fetch function on the svr.fetch***
public DataPortalResult Fetch(Type objectType, object criteria, DataPortalContext context)
{
ChannelFactory<IWcfPortal> cf = new ChannelFactory<IWcfPortal>(_endPoint);
IWcfPortal svr = cf.CreateChannel();
*****WcfResponse response =
svr.Fetch(new FetchRequest(objectType, criteria, context));
cf.Close();
object result = response.Result;
if (result is Exception)
throw (Exception)result;
return (DataPortalResult)result;
}
The error I am getting is:
There was an error running this application, the error has been logged: System.InvalidOperationException: Cannot serialize the DataTable. DataTable name is not set.
This call happens to be a function retrieving a NameValueListBase.
Any help would be appreciated.
Copyright (c) Marimer LLC