AjaxMapControl GDALRasterLayer

Topics: SharpMap Project, SharpMap v2.0, Web Controls
Jun 20, 2013 at 2:27 PM
Edited Jun 20, 2013 at 2:29 PM
Adding a GDAL raster layer doesn't work. Here is the server output:

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

Source Error:


Line 112:
Line 113: // Register drivers
Line 114: Gdal.AllRegister();
Line 115: _configuredGdal = true;
Line 116:

Source File: C:\...\sharpmap-102922\Trunk\SharpMap.Extensions\GdalConfiguration.cs Line: 114

Code for adding the the layer:
SharpMap.Layers.GdalRasterLayer lay1 = new SharpMap.Layers.GdalRasterLayer("lay1", @"~\App_data\utm.tif");
map.Layers.Add(lay1);
utm.tif is the file used in examples.
Any ideas wether this is possible to fix and how?
Coordinator
Jun 20, 2013 at 10:29 PM
Is it the development machine or the production?
Have you added nuget GDAL.Native package to your project?