Select to view content in your preferred language

Environment Settings for SOE

756
2
Jump to solution
09-26-2012 10:13 AM
JustinHunter
Regular Contributor
Hey all,

I have recently been learning about SOE, and even made my first extension that can take in parameters passed by my companies CMS that will add/update a point on a table.

With that said, we have three environments (develop/training/production) - normally I'd use an app.config / web.config to set an appSetting to point to a specific layer, but I haven't been able to figure out how to do this in SOE. Since the executing assembly seems to be ArcSOC.exe (I think) the app.config in my VS2010 project doesn't take affect. I need some way of being able to modify these layers based on the environment (name_<environment>), without creating three different extensions on my server.

Any ideas?
0 Kudos
1 Solution

Accepted Solutions
RichardWatson
Deactivated User
This should easy to solve.

One solution is to put an XML file in a well known location on the machine and have your SOE read it when it starts up.  It doesn't have to be app.config.  Maybe something like C:\YourService\Parameters.xml?  Of course, you will have to deploy it.

With the SOE there is also the ability to provide configuration options when it is enabled on the map service.  That would allow you to specify whatever parameters you need per map service.  In 9.3.1, I provided a property page to collect this information in ArcCatalog.

View solution in original post

0 Kudos
2 Replies
RichardWatson
Deactivated User
This should easy to solve.

One solution is to put an XML file in a well known location on the machine and have your SOE read it when it starts up.  It doesn't have to be app.config.  Maybe something like C:\YourService\Parameters.xml?  Of course, you will have to deploy it.

With the SOE there is also the ability to provide configuration options when it is enabled on the map service.  That would allow you to specify whatever parameters you need per map service.  In 9.3.1, I provided a property page to collect this information in ArcCatalog.
0 Kudos
JustinHunter
Regular Contributor
The first solution of reading in an XML works best in this scenario, thanks. I decided to pass in a variable called 'environment' and it would open the appropriate XML which I can modify at any time and have my changes immediately picked up.

Thanks 🙂
0 Kudos