Select to view content in your preferred language

[Error] 'ESRI.ArcGIS.Mobile.CoreApi.NativeMethods' threw an exception

3469
1
Jump to solution
12-03-2012 05:27 AM
Andréde_Mattos_Ferraz
Deactivated User
Im using mobile 3.1 dll...

My application type:
[ATTACH=CONFIG]19667[/ATTACH]

My code:
        public Form1()
        {
            InitializeComponent();

            /*
             * Uncomment one of the following section to load to the map from a 
             * tiled service, tiled dataset, tiled package, StreetMap for Windows Mobile dataset, 
             * mobile service or mobile cache
             */


            #region Mobile service code snippet
            //MobileServiceConnection 
            //string mobileServiceUrl = @"http://srv508/arcgis/services/CENIBRA/UsoSoloMobile/MapServer/MobileServer";
            string mobileServiceUrl = @"http://srv514/arcgis/rest/services/FIBRIA/mob_parcel/MapServer/MobileServer";
            MobileServiceConnection mobileServiceConnection = new MobileServiceConnection();
            mobileServiceConnection.Url = mobileServiceUrl;

            //MobileCache 
            string cacheStoragePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\MapCache";
            MobileCache mobileCache = new MobileCache(cacheStoragePath);
            if (mobileCache.CacheExists == true)
                mobileCache.DeleteCache();

            //Create the schema of the mobile cache and add it to map.
            //Note that you have to download data from the mobile service in order to display the data
            mobileServiceConnection.CreateCache(mobileCache); //(Throw HERE)
            mobileCache.Open();
            map1.MapLayers.Add(mobileCache);
            #endregion
        }


Error description:
[ATTACH=CONFIG]19665[/ATTACH]

My Project config:
[ATTACH=CONFIG]19666[/ATTACH]


Any suggestion?
thx advance.
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: fandre12345

Solution:
Remove all dependencies of Arcgis 10 and install all dependecies of arcgis 10.1 then install arcgis mobile 3.1 and sdk 3.1!

View solution in original post

0 Kudos
1 Reply
by Anonymous User
Not applicable
Original User: fandre12345

Solution:
Remove all dependencies of Arcgis 10 and install all dependecies of arcgis 10.1 then install arcgis mobile 3.1 and sdk 3.1!
0 Kudos