Simplify SOE Deployment with Self Registration
Registering SOE’s can be a pain, but there is an easier way.
Esri suggests having a separate exe that registers the dll, but this needs to be done after running Regasm on it.
On top of that, if you’re running Win7, and right click on a .bat file and choose to “run as Administrator”, the current working directory does not get set to the folder where the .bat is located. What a pain.
Instead of building an SOE as a dll, build it as an exe. The Main program of the SOE can do the registration/unregistration. First, by calling Regasm, and then by registering with AGS, similar to Esri’s sample.
I haven’t tested this a lot in production, so if you run into issues, please let me know.
I’ve posted a sample solution here that illustrates this.