Server Object Extension Location at runtime

991
2
11-29-2012 12:15 PM
ericliprandi
New Contributor III
Hi,
We are trying to find out how to programmatically discover where the SOE gets "installed". We know it's under C:\Users\<arcgisuser>\AppData\Local\ESRI\Server10.1\AssemblyCache\{some guid}, but obviously, we don't want to hard-code such a path. Is there a way, starting inside the SOE Init() method, using the ServerObjectHelper, to find out such information?

We are using this to retrieve configuration files and other resources that are packaged with the SOE at runtime. Our current approach is using the current assembly path. This works fine for developers, however, we currently deploy a copy of our SOE assembly in the GAC. We are looking into fixing/changing this, but for now, that is what we have. This causes the SOE to be loaded from the GAC instead of the AssemblyCache folder. In turn, it cannot find the resources packaged with the SOE itself.
We do feel that ArcGIS Server should prefer the AssemblyCache dll version over the GAC, but we can't change that at this point.

Any pointers would be greatly appreciated.

Eric.
Tags (2)
0 Kudos
2 Replies
RichardWatson
Frequent Contributor
I have the exact same problem.  I solved it by not putting my SOE in the GAC.

If, for whatever reason, you want something in the GAC then my suggestion is to make your SOE very light weight and have simply forward the calls to the assembly in the GAC.
0 Kudos
ericliprandi
New Contributor III
Richard,
Thanks for the info. That was my belief too. Unfortunately, making the SOE ligthweight is a political battle that I was trying to avoid...
0 Kudos