[DevExpress Support Team: CLONED FROM XPO – 11.1 Sneak Peek - WCF services for IDataStore ]
Hi, Dennis,
We have built our application using XPO that consuming the DataStore WCF service。But I found that , connectionString in method <string connectionString, AutoCreateOption defaultAutoCreateOption) (version 18.2)> does not support WCF svc URI any more in .net core。So we can not extend our application using the current DAL infrustructure for .net core apps.
Do you have the plan to support WCF datastore in .netcore that shall make users extend app in .net core easily, or they must rewrite the whole DAL code for .net core apps?
I do think it is a big problem if XPO do not support WCF Datastore client in .netcore.
WCF client in .NET Core
Answers approved by DevExpress Support
Hello,
DataStoreClient, CachedDataStoreClient, and their async versions are supported in client .NET Core apps (for instance, Xamarin).
We have just cut off the methods used to automatically create these IDataStore objects from a connection string:
C#//DevExpress.Xpo\XpoDefault.cs
#if !DXPORTABLE && !DXCORE3
static IDataStore CreateWCFWebServiceStore(string connectionString) {
EndpointAddress address = new EndpointAddress(connectionString);
BasicHttpBinding binding = new BasicHttpBinding();
if(!string.IsNullOrEmpty(connectionString) && connectionString.StartsWith("https://")) {
binding.Security.Mode = BasicHttpSecurityMode.Transport;
}
binding.MaxReceivedMessageSize = Int32.MaxValue;
binding.ReaderQuotas.MaxArrayLength = Int32.MaxValue;
binding.ReaderQuotas.MaxDepth = Int32.MaxValue;
binding.ReaderQuotas.MaxBytesPerRead = Int32.MaxValue;
binding.ReaderQuotas.MaxStringContentLength = Int32.MaxValue;
return CreateWcfServiceStore(connectionString, address, binding);
}
...
The only reason for this is not to add extra dependencies required to create bindings. For instance, BasicHttpBinding requires https://www.nuget.org/packages/System.ServiceModel.Http/; other bindings require other Nuget packages.
XPO developers can create and configure DataStoreClient and other XPO APIs as well as standard bindings in their client apps manually.
The only limitation is about the WCF hosting, because .NET Core itself does not support the ServiceHost API (this is out of our control, though):
https://github.com/dotnet/wcf/issues/2559
https://github.com/dotnet/wcf/issues/1200#issuecomment-356422289
XPO developers can still host their data services under the full .NET Framework and have .NET Core-based clients as consumers.
Let me know if you require any further clarification.
Hello,
XAF v19.2.4+ allows you to use Middle Tier Security client-related classes (WcfSecuredClient, MiddleTierServerObjectSpaceProvider and MiddleTierClientSecurity) in .NET Standard 2.0/.NET Core projects. You can connect a .NET Core client application to a .NET Framework WCF server only (due to .NET Core platform limitations).
Thanks,
Andrey