You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have project where I need to sync Multiscope from SQL server DB to SQLite using Asp.net core API, the local database server is SQL and the remote database server is SQLite , running on Windows with the sync proxy running on IIS, by following the documentation I always get Default Scope in Post() which ends up with "webserverAgent was null"
This is Setup Server side
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddMemoryCache();
services.AddDistributedMemoryCache();
services.AddSession(options => options.IdleTimeout = TimeSpan.FromMinutes(30));
// [Required]: Get a connection string to your server data source
var connectionString = Configuration.GetSection("ConnectionStrings")["DefaultConnection"];
var ItemsTB = new string[] { "ItemId", "ItemCode", "ArabicItemName", "CategoryOneEnabled", "CategoryTwoEnabled", "CategoryThreeEnabled", "CategoryOneListEnabled", "CategoryTwoListEnabled", "LatestLocalCost", "LatestForeignCost", "LatestLocalPurchasePrice" };
services.AddSyncServer<SqlSyncChangeTrackingProvider>(connectionString, "Items", ItemsTB);
var ItemUnitPriceTB = new string[] { "UnitItemID", "ItemID", "UnitID", "UnitQuantityX", "FirstPrice", "SecondPrice", "ThirdPrice", "FourthPrice", "FifthPrice", "LeastPrice" };
services.AddSyncServer<SqlSyncChangeTrackingProvider>(connectionString, "ItemUnitPrice", ItemUnitPriceTB);
var barcodeTB = new string[] { "BarcodeID", "Barcode", "UnitItemID" };
services.AddSyncServer<SqlSyncChangeTrackingProvider>(connectionString, "barcode", barcodeTB);
var UnitsTB = new string[] { "UnitID", "UnitDiscription" };
services.AddSyncServer<SqlSyncChangeTrackingProvider>(connectionString, "Units", UnitsTB);
var StoresTB = new string[] { "StoreId", "ArabicStoreName" };
services.AddSyncServer<SqlSyncChangeTrackingProvider>(connectionString, "Stores", StoresTB);
var StockTB = new string[] { "StockID", "ItemID", "StoreID", "CategoryOne", "CategoryTwo", "CategoryThree", "QuantityIn", "QuantityOut", "ObjectID", "InvoiceID", "InvoiceItemsID", "InvoiceDateTimeIssue" };
services.AddSyncServer<SqlSyncChangeTrackingProvider>(connectionString, "Stock", StockTB);
var CostInCostOutTB = new string[] { "CostInCostOutID", "ItemId", "StoreId", "CostIn", "CostOut", "QuantityIn", "QuantityOut", "ObjectID", "InvoiceID", "InvoiceItemsID", "InvoiceDateTimeIssue" };
services.AddSyncServer<SqlSyncChangeTrackingProvider>(connectionString, "CostInCostOut", CostInCostOutTB);
}
and this tis Client side
private async void SyncApp0()
{
var serverOrchestrator = new WebRemoteOrchestrator("https://localhost:44342/api/sync");
var clientProvider = new SqliteSyncProvider("C:\\Abo\\SQLLight\\advworks101.db3"); ;
SyncAgent agent = new SyncAgent(clientProvider, serverOrchestrator);
var result = await agent.SynchronizeAsync();
}
The text was updated successfully, but these errors were encountered:
I have project where I need to sync Multiscope from SQL server DB to SQLite using Asp.net core API, the local database server is SQL and the remote database server is SQLite , running on Windows with the sync proxy running on IIS, by following the documentation I always get Default Scope in Post() which ends up with "webserverAgent was null"
This is Setup Server side
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddMemoryCache();
and this tis Client side
private async void SyncApp0()
{
The text was updated successfully, but these errors were encountered: