I am trying to sync between the mobile cache and a secured rest map service for mobile. Though I do not get error, but nothing is sync, no results. What's wrong in code. MobileCacheSyncResults MobileSyncResults;
MobileSyncResults = new MobileCacheSyncResults();
try
{
MobileServiceConnection MobileServiceConnection;
MobileServiceConnection = new MobileServiceConnection();
//MobileServiceConnection.TokenCredential = new ESRI.ArcGIS.Mobile.CatalogServices.TokenCredential();
//MobileServiceConnection.TokenCredential.UserName = @"xxxx";
//MobileServiceConnection.TokenCredential.Password = @"xxx2";
MobileServiceConnection.Url=@"http://xxxx/ArcGIS/rest/services/xx/xx/MobileServer?token=6U0ieIXOpLa6X0bnxaCrxFij7b-w252hF08jysacxPiqnXIB9ZFEZDO2a6jrKT45JoepaEXfbi9cl-Ij8Z7bKYwxdph48uBPW-mz9rN4wIl_u1i3FOJ_BVyMAx5gBc4A4uuFouwI-2CIi_cnt6gk0m4xB8PU4BjFbmQ1xJ1ovo4";
MobileCache MobileCache = CoM_MobileInfrastructureClass.Resources.PassFeatureReader.MobileCache;
MobileServiceConnection.WebClientProtocolType = WebClientProtocolType.SoapWebService;
//// Use MobileCacheSyncAgent to download data from server
MobileServiceConnection.CreateCache(MobileCache);
MobileCache.Open();
MobileCacheSyncAgent SyncAgent;
SyncAgent = new MobileCacheSyncAgent(MobileCache, MobileServiceConnection);
//// Open MobileCache and sync
SyncResults results = SyncAgent.Synchronize();
ESRI.ArcGIS.Mobile.Geometries.Envelope evp = MobileCache.GetExtent();
MobileSyncResults = SyncAgent.DownloadExtent(evp, 0, 1000000);