Extract Data sample using gpk

2917
3
Jump to solution
11-04-2014 09:25 PM
NaomichiKUWAHARA
Esri Contributor

Hi,

When I execute Extract Data sample using gpk, I cannot get the output zip file because the directory is difference between Uri and actually file is generated.

Please refer the attached sample application to reproduce this behavior.

The code of sample application is based to ExtractData.xaml/ExtractData.xaml.cs on Github.

If you are able to reproduce, please teach me how I can get the extract data file.

Thanks,

0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor

With the help of a colleague, I eventually figured out the issue.

There is actually a config file that lists the mime types that the local server can serve.

Par default, only lyr files are allowed.

{

"lyr"  : "application/octet-stream"

}

By adding a zip entry in this file, your GP task works:

{
    "lyr"  : "application/octet-stream" ,
    "zip"  : "application/octet-stream"
}

The file is called  mimeTypes.json and is under C:\Program Files (x86)\ArcGIS SDKs\DotNet10.2.4\WindowsDesktop\bin\arcgisruntime10.2.4\LocalServer64\bin (or LocalServer86 in 32bits)

It must be edited manually.

/Dominique

View solution in original post

0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor

We were able to reproduce the issue which needs further investigations.

We'll let you know as soon as we figured out the issue...

Thanks

0 Kudos
DominiqueBroux
Esri Frequent Contributor

With the help of a colleague, I eventually figured out the issue.

There is actually a config file that lists the mime types that the local server can serve.

Par default, only lyr files are allowed.

{

"lyr"  : "application/octet-stream"

}

By adding a zip entry in this file, your GP task works:

{
    "lyr"  : "application/octet-stream" ,
    "zip"  : "application/octet-stream"
}

The file is called  mimeTypes.json and is under C:\Program Files (x86)\ArcGIS SDKs\DotNet10.2.4\WindowsDesktop\bin\arcgisruntime10.2.4\LocalServer64\bin (or LocalServer86 in 32bits)

It must be edited manually.

/Dominique

0 Kudos
NaomichiKUWAHARA
Esri Contributor

Hi Dominique,

Thank you for your reply.

My sample app worked fine by edit mimeTypes.json.

Thank you!!

0 Kudos