Closed txt2203 closed 6 months ago
This is an XPO exception and should go away once you use a ThreadSafeDataleyr
e.g.
args.ObjectSpaceProvider=new SecuredObjectSpaceProvider((ISelectDataSecurityProvider) Security, new ConnectionStringDataStoreProvider(args.ConnectionString), true);
In Startup.cs of Winform project, I added "options.ThreadSafe = true;" then the program and module ExcelImporter ran normally.
public class ApplicationBuilder: IDesignTimeApplicationFactory {
public static WinApplication BuildApplication(string connectionString) {
var builder = WinApplication.CreateBuilder();
builder.UseApplication
if(System.Diagnostics.Debugger.IsAttached && application.CheckCompatibilityType == CheckCompatibilityType.DatabaseSchema) {
application.DatabaseUpdateMode = DatabaseUpdateMode.UpdateDatabaseAlways;
}
});
var winApplication = builder.Build();
return winApplication;
}
XafApplication IDesignTimeApplicationFactory.Create()
=> BuildApplication(XafApplication.DesignTimeConnectionString);
}
Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.
𝗗𝗲𝘀𝗰𝗿𝗶𝗯𝗲 𝘁𝗵𝗲 𝗯𝘂𝗴 I made simple project XAF Winform .NET6 and use module ExcelImporter. After import files, file content and add Keymap, I run "Import", but it show: Reentrancy or cross thread operation detected. Use ThreadSafeDataLayer or find the cause of the cross thread access to the SimpleDataLayer instance from your code as described in https://www.devexpress.com/kb=T419520. To suppress this exception, set DevExpress.Xpo.SimpleDataLayer.SuppressReentrancyAndThreadSafetyCheck = true
𝗧𝗼 𝗥𝗲𝗽𝗿𝗼𝗱𝘂𝗰𝗲 Make a simple XAF Winform .NET6 . Add module ExcelImporter. Run. Add File, Keymap. For Excel file with only several rows, it imports OK. For >~1000 rows, above error appears.
err.txt