-
Is there any extra settings required for filters, when provisioned through TCP with no synchronisation?. The same code works perfectly when provisioning happens automatically with synchronisation through http://192.168.1.77:81/api/sync. Client Device
Windows Provisioning - On ButtonClick
i am using the same reference on the windows application too. Code on Proxy - http://192.168.1.77:81/api/sync
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I dont see filter declaration in your windows provisioning SqlSyncProvider serverProvider = new SqlSyncProvider(
@"Data Source=SERVERMachine\SQLEXPRESS01; Initial Catalog=CORETEST; Integrated Security=true;Trusted_Connection=true;TrustServerCertificate=True;MultipleActiveResultSets=False;");
var progress = new SynchronousProgress<ProgressArgs>(pa => Console.WriteLine($"{pa.ProgressPercentage:p}\t {pa.Message}"));
var options = new SyncOptions
{BatchDirectory = Path.Combine(SyncOptions.GetDefaultUserBatchDirectory(), "server") };
var remoteOrchestrator = new RemoteOrchestrator(serverProvider);
var setup = new SyncSetup("_clnt");
await remoteOrchestrator.ProvisionAsync("v0", setup); In your proxy var connectionString = builder.Configuration.GetSection("ConnectionStrings")["SqlConnection"];
var options = new SyncOptions
{ BatchDirectory = Path.Combine(SyncOptions.GetDefaultUserBatchDirectory(), "server") };
var setup = new SyncSetup("_clnt", "PROJECT");
var clntFilter = new SetupFilter("_clnt");
clntFilter.AddParameter("CLNT_ID", "_clnt", true);
clntFilter.AddWhere("CLNT_ID", "_clnt", "CLNT_ID");
setup.Filters.Add(clntFilter);
var projFilter = new SetupFilter("PROJECT");
projFilter.AddParameter("CLNT_ID", "PROJECT", true);
projFilter.AddWhere("CLNT_ID", "PROJECT", "CLNT_ID");
setup.Filters.Add(projFilter);
builder.Services.AddSyncServer<SqlSyncProvider>(connectionString, setup,null,null,"v0"); You are declaring a scope "v0" with two tables and filters, but in your windows application you are declaring only one table without filter with the same scope name "v0" What is the purpose of your windows application ? Provisioning the server ? Or provisioning your clients ? |
Beta Was this translation helpful? Give feedback.
-
I thought the filter will be handled on web-api as the client's request comes through the web-api. http://192.168.1.77:81/api/sync and thus i did not filter when provisioned through the windows.
|
Beta Was this translation helpful? Give feedback.
-
i think it works now. Thank you very much.
|
Beta Was this translation helpful? Give feedback.
I dont see filter declaration in your windows provisioning