12-15-2016 01:10 PM - edited 12-15-2016 01:26 PM
We are miragting GMSC application for a our customer from 2014 to 2016. One of the custom function is to generate an image for an input feature instance, addtional parameters are project view or bounding box.
Our 2014 version is working fine, but when we are migrating the code from 2014 to 2016 (update with source code with 2016 dll(s), the application is now no longer working and it throws an exception in Intergraph.Emea.Maps.RasterUtil. The exception message is quite confusing. I even de-compiled the dll to trace the root of the exception but still have no idea how to fix that.
Here is the code that s the exception, the code is similar to the sample posted in GMSC dot net API (2014 version)
So I just wonder whether there are other changes in 2016 version that I am not aware of and necessary in order to make it work.
Appreciate all the input and suggestions for this matter.
Solved! Go to Solution.
12-19-2016 05:21 PM
Thank you for looking at this. The MapService.log doesn's show anything, I really no idea on what can go wrong.
12-20-2016 01:40 AM
can you please try to put something in the log file on your own? You may put the parameters you are using for your output to understand if all of them are correctly managed. In case you may also debug the application by connecting the remote IIS process.
12-20-2016 09:12 PM - edited 12-20-2016 09:13 PM
My custom service does have a log service and I double check all input parameters before calling the creating map api.
During my investigation, I also de-compile the dll Intergraph.Emea.Map.Services which is responsible for all map services and publishing. One of its actions is using the mostly same code that we do to generate the static image and it is working with our input. Here is an example of calling the core GMSC action:
Here is the code of the action in the dll Intergraph.Emea.Map.Services
So, basically the Create Map function of Map server works in the core GMSC function but when our custom function uses it, it shows an exception "The type initializer for 'Intergraph.Emea.Maps.RasterUtil" threw an exception". I believe there are some compulsory components that need to be initialized and we don't know how to do it in our function, and that change seems to appear in GMSC 2016.
Here is the detail on how we deploy our function. Hopefully, someone can give us some suggestions on what goes wrong.
I also attach our source code and deploying components if someone is interested in looking at this.
Appreciate all the insights and suggestions
01-10-2017 04:40 AM
You need to copy the gdal folder from INSTALLDIR\Program into your application's bin folder. GDAL native libraries are needed at runtime.
01-10-2017 08:25 PM
Thank you so much Thomas for your suggestions. I copy these gdal dlls (those from Maps/bin folder) and it starts working