how wcf config file sections works with CODE Framework

Jan 10, 2013 at 7:42 PM

Markus,

I have a question regarding how the wcf config files work in sync with the framework? Say if I'd like to add a <serviceBehaviors> section in the config file to define the throttling behavior, and configure customer service to used that behavior with basichttp binding. And use the same address, say http://localhost/dev/ICustomerService/basic

Is there a way to let the code framework to take in the additional behavior? I can change the address to something like http://localhost/dev/ICustomerService/basic/myaddress in my config file. But then it's not managed by the code framework anymore (i.e. the TestServiceHost will not list this endpoint in the window). 

I wonder if there's a more elegant way to let the Code Framework to "absorb" the configuration sections?

 

Thanks. 

Coordinator
Jan 24, 2013 at 3:22 PM

Greg,

You should be able to set all the regular settings in the config file and they should still take since we are not doing anything special for that.

You can also configure all the services programmatically. The ServiceGarden class fires BeforeHostAdded and BeforeEndpointAdded events, which can be used to do anything conceivable with those hosts and endpoints. Of course while programmatic configuration works for everything, it isn't necessarily the preferred approach for some options. Throttling is probably an aspect that would be better to configure in the config file.

Markus

Coordinator
Feb 16, 2013 at 1:22 PM
One more additional thought on this: For the very specific need to change throttling, we are adding new features for the next release (due within a matter of days) directly to the framework.

Take a look at these docs:
Hope this helps!
Markus