I am trying to figure out how to get an handle on the endpoints of the service host and modify their identity. I have endpoints defined in the config file but want to modify the endpoints programmatically depending on the environment (ex:QA, UAT, Prod)
Service is hosted on IIS6 and I am using a servicehostfactory to provide my extended servicehost class to IIS.
I am using opening event to get an handle on the endpoints that are already defined from the config file but can't figure out how to modify their identity. Is that even possible? Are endpoints are immutable after they are created?
If I can't modify the endpoints then is the "Opening" event of the servicehost is the correct event to add a service endpoint?