ArcGISLocalDynamicMapServiceLayer relative path doesn't work?

2278
5
07-10-2013 08:05 AM
Labels (1)
ducksunlimited
New Contributor
Hello All, I have a vector.mpk in a folder called Packages which is under the main project. Then I used relative path to refer to the map package but didn't work. Can anybody tell me the correct format?

<esri:ArcGISLocalDynamicMapServiceLayer ID="Vector" Path="Packages\vector.mpk"/>

Thanks,
Russel
0 Kudos
5 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

The path is relative to executing application which by default might be in <project_name>\bin\debug. Therefore you'll need to take this into account, and ideally set the output folder for your application in the project settings to mimic your intended deployment structure.

Cheers

Mike
0 Kudos
ducksunlimited
New Contributor
I have been having issues with deploying a runtime WPF app. The app uses a local .mpk and an arcgis online imagery service as base map. i can successfully deploy it with arcgis online map service only, but gave me an error if I included .mpk (ArcGISRuntimeApp has stopped working.....Do you want to send more information about the problem?). can anybody please help? Thanks so much.

Chris


Hi,

The path is relative to executing application which by default might be in <project_name>\bin\debug. Therefore you'll need to take this into account, and ideally set the output folder for your application in the project settings to mimic your intended deployment structure.

Cheers

Mike
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

There are a few things to check:

- When deploying your application, have you created an ArcGISRuntime deployment with the Deployment Builder?
- The deployment needs to include the LocalServer option.
- The deployment is contained within a folder such as "arcgisruntime10.2" which should be placed alongside your application executable
- Relative paths to the map package (.MPK) are resolved relative to your application executable.
- If you have chosen to reference the data when creating your Map Package you need to ensure that the same path is viable on your deployment machine (e.g. "C:\MyData\MapPackages\MyMapPackage.mpk").

You can also use the Local Server Utility accessed from the Start Screen/Menu to enable logging in the ArcGIS Runtime LocalServer. If you want to enable logging in your deployment you can switch this on when using the Deployment Builder.

Cheers

Mike
0 Kudos
ducksunlimited
New Contributor
Thanks for your reply, Mike.

I double checked and have run a few more tests this morning. Yes, I used the Deployment Builder to deploy the app and made sure I checked the LocalServer for deployment. I placed all required .dlls and .mpk and .exe file alongside arcgisruntime10.1 folder. I used relative path for the mpk. But still unable to run it on the deployment machine which is a thinkpad tablet with Win 8 pro installed.

When i deploy the app, i checked the Enable Runtime Debug option, but I couldn't find a arcgisruntimelogging file on the deployment machine under %temp%.

what could be wrong? I start feeling frustrated. any further suggestions please.

Chris


Hi,

There are a few things to check:

- When deploying your application, have you created an ArcGISRuntime deployment with the Deployment Builder?
- The deployment needs to include the LocalServer option.
- The deployment is contained within a folder such as "arcgisruntime10.2" which should be placed alongside your application executable
- Relative paths to the map package (.MPK) are resolved relative to your application executable.
- If you have chosen to reference the data when creating your Map Package you need to ensure that the same path is viable on your deployment machine (e.g. "C:\MyData\MapPackages\MyMapPackage.mpk").

You can also use the Local Server Utility accessed from the Start Screen/Menu to enable logging in the ArcGIS Runtime LocalServer. If you want to enable logging in your deployment you can switch this on when using the Deployment Builder.

Cheers

Mike
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

What is the actual error you receive?

The log file should be created in %temp%\ArcGISRuntimeLogs (e.g. C:\Users\<user>\AppData\Local\Temp\ArcGISRuntimeLogs).

Cheers

Mike
0 Kudos