2

I have ArcGIS Server Object Extension (SOE) written in .NET, C#. Target framework is .NET 4.5.

Extension works OK at many customers but there is an issue at one customer who has class extensions targeting .NET 2.0. Uploading SOE file to ArcGIS Server - OK. Enable our extension for map service and starting it, an error occurs:

Failed to initialize server object 'MapServiceName': 0x80131523: Entry point was not found.

Not much information what went wrong... I tried to turn log level to debug - ArcGIS doesn't show more details.

My question is how to get more information about such error?

Turn on catalina error log for ArcGIS internal web server? Other methods?

The issue is not the mix of .NET 2 and .NET 4 frameworks. The previous SOE version was also targeting .NET 4.5 but it worked side by side with these .NET 2.0 extensions fine.

HRESULT 0x80131523 is COR_E_ENTRYPOINTNOTFOUND - Could not find the specified DllImport entrypoint.


Created REST SOE proxy to invoke AssemblyLoad.Load() inside ArcSOC and tried to load real SOE dlls. All were loaded OK.


Removed 3rd party extensions while found the single extension showing this behavior. It is ArcFM Solution Object Reader 10.2.1c for ArcGIS Server (by Schneider Electric).

  • I think this sounds like a problem for Esri Support as it's possibly very specific to your setup – Midavalo Feb 9 '17 at 16:12
  • @Midavalo, I want to know how to get more meaningful log. I believe the issue is in versioning of satellite assemblies or stuff like that. – r.pankevicius Feb 9 '17 at 16:43
  • I recommend you to use the Assembly Binding Log Viewer, and see if there is an error during assembly binding. It has helped me a lot finding errors during the activation of ArcGIS SOEs. Also you can check the following path: C:\Users\arcgis\AppData\Local\ESRI\Server<<your-version>>\AssemblyCache It could contain old assemblies from a normal installation that can produce error during assembly binding. – Katah Feb 10 '17 at 9:31
  • @Katah, I tried different versions of FUSLOGVW.exe I found on my disk: 4.0 and 3.5. The strange thing is that I don't get any logs here when trying to start map service... – r.pankevicius Feb 10 '17 at 10:15
  • Did you use the 64bits version? It shouldn't be problem, I am getting the same with both, but just in case. You can configure the settings to log bind failures to disk, or also 'all binds' and check weather you have an assembly with an incorrect version. I am using the 4.0 version, and if there is an error during assembly binding you would have an entry for the ArcSOC.exe application. – Katah Feb 10 '17 at 11:04
1

The issue was that ArcFM Solution Object Reader installed (Microsoft.Practices.) ServiceLocation and Unity in C:\Program Files\ArcGIS\Server\bin folder and our SOE had different versions of them, etc. Quite specific stuff...

However I was able to attach debugger and debug SOE by delaying initialization code of the extension: errors occurr during normal requests to SOE, not during init. (The code changes are just ugly temporary stuff for debugging purposes).

private IServerObjectHelper pSOH;
private IPropertySet props;
private bool initWasDone;

public SoeServer()
{
    // Empty constructor
}

public void Init(IServerObjectHelper pSOH)
{
    this.pSOH = pSOH;
}

public void Construct(IPropertySet props)
{
    this.props = props;
}

public void Shutdown()
{
    if (initWasDone)
        DoShutdown();
}

private void DelayedInit()
{
    if (initWasDone)
        return;
    initWasDone = true;
    // ... all the stuff from constructor, Init, Construct goes here
}

// Then all methods call DelayedInit, e.g.
public byte[] HandleBinaryRequest(ref byte[] request)
{
    DelayedInit();
    // ... normal flow
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.