Please look into T214347 for reference.
So I have replaced the Application Server with a WCF Service. This is working well. However, I have a problem with the WCF Service and storing the model in the database. I have modify my code as per the documentation Client-Side Security - Integrated Mode as follows:
Stop using the ThreadSafeDataLayer by passing false to the Object Space Provider constructor's threadSafe parameter (not recommended in ASP.NET applications).
Do not specify the database storage for application-wide model differences in the XafApplication.CreateCustomModelDifferenceStore event handler (you can still store user-specific differences in the database using theXafApplication.CreateCustomUserModelDifferenceStore event).I tried these 2 recommendations separately and at the same time and still have the following error:
Unable to save customization information:
Cannot Save user settings to the database.
Contact your application administrator for a solution. You can also try to find the reason of this failure yourself by checking the log file.
Error in deserializing body of request message for operation ModifyDataCached.
What can I do? My code looks like this:
C#// This is on the xxx.Module.Win project on WinModule.cs
private void Application_CreateCustomModelDifferenceStore(Object sender, CreateCustomModelDifferenceStoreEventArgs e)
{
//e.Store = new ModelDifferenceDbStore((XafApplication)sender, typeof(ModelDifference), true);
e.Handled = true;
}
private void Application_CreateCustomUserModelDifferenceStore(Object sender, CreateCustomModelDifferenceStoreEventArgs e)
{
e.Store = new ModelDifferenceDbStore((XafApplication)sender, typeof(ModelDifference), false);
e.Handled = true;
}
// This is on the xxx.Win project on WinApplication.cs
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
{
args.ObjectSpaceProvider = new SecuredObjectSpaceProvider((SecurityStrategyComplex)Security, args.ConnectionString, args.Connection, false);
}
Regards,
Carlos
Hello Carlos,
As I see, you are using SecuredObjectSpaceProvider, but wrote that you used the WCF application server. Do you have other code files where you configured this, because these two settings contradict each other?
Would you please post a small sample project illustrating this error so we can debug it locally and assist you further?