I created a Geoprocess to upload an AutoCAD file (dxf) and return a Polygon contained in it. When I run the service using a post message, it runs and concludes sucessfuly. But when I try to use the service via get or Silverlight (wich also uses get) the service fails for the same file.Here's the code that calls my service:private void LoadCADFile(object sender, RoutedEventArgs e)
{
var openFileDialog = new OpenFileDialog
{
Multiselect = false,
Filter = "AutoCAD File (*.dxf)|*.dxf",
FilterIndex = 1
};
openFileDialog.ShowDialog();
if (openFileDialog.File == null) return;
var fileStream = openFileDialog.File.OpenRead();
var uploadTask = new UploadTask(@"http://oba:6080/arcgis/rest/services/SAEB/AutoCad/GPServer")
{
DisableClientCaching = true
};
uploadTask.UploadCompleted += CADFileLoaded;
uploadTask.UploadAsync(new UploadParameters
{
FileName = openFileDialog.File.Name,
FileStream = fileStream,
});
}
private void CADFileLoaded(object sender, UploadEventArgs e)
{
var geoprocessor = new Geoprocessor(@"http://myserver/arcgis/rest/services/AutoCad/GPServer/AutoCad")
{
DisableClientCaching = true,
ReturnM = false,
ReturnZ = false
};
geoprocessor.JobCompleted +=
(s, args) =>
args.JobInfo.Messages.ForEach(
message =>
MessageBox.Show(message.Description, message.MessageType.ToString(), MessageBoxButton.OK));
geoprocessor.SubmitJobAsync(new List<GPParameter>
{
new GPItemID("Parque_de_Pituaçu_2013__wgs84__dxf",
e.Result.Item.ItemID)
});
}