I created a custom service host and overriding ApplyConfiguration()
works well but I cannot find a way to add service behaviors.
All service model is removed from config file and setup is fetched from database.
Endpoints works just fine.
Service behaviors are a pain. I tried to add a ServiceBehaviorElement
to the System.ServiceModel.Configuration.BehaviorsSection
but it's read only and I cannot get around this.
I tried just adding the behavior to the servicehost.Description
, but I cannot add a full behavior element there, one with a Name attribute and where I could have a group of behaviors.
Any help would be great.