[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 819
  • Last Modified:

Sync issue

I am trying to synchronize my updates on a button click( by keeping mobile as server and provider as client).Following is the code used for synchronization:
 Dim syncAgent As LocalDataCache1SyncAgent = New LocalDataCache1SyncAgent()
Dim syncStats As Microsoft.Synchronization.Data.SyncStatistics = syncAgent.Synchronize()
 
But on button click I am getting the following error:
 Argument Null Exception
Value can not be null. Parameter name: ServerSyncProvider
If I command this line,
Dim syncStats As Microsoft.Synchronization.Data.SyncStatistics = syncAgent.Synchronize()
 then it wont give the error, and no sync also working.
Need your help.
0
Rajeshk_cgm
Asked:
Rajeshk_cgm
1 Solution
 
Mikal613Commented:
Dim syncStats As Microsoft.Synchronization.Data.SyncStatistics

//Set some properties

syncAgent.Synchronize()

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now