mikeobrien / WcfRestContrib

The WCF REST Contrib library adds additional functionality to the current WCF REST implementation.
MIT License
49 stars 18 forks source link

ServiceConfigurationAttribute should merge settings (shaunco) #9

Open mikeobrien opened 14 years ago

mikeobrien commented 14 years ago

The current logic in WcfRestContrib.ServiceModel.ServiceHostBaseExtensions.LoadBehaviors seems geared towards allowing behaviors specified delcaritively in [ServiceConfiguration] to override server config values, however WcfRestContrib.ServiceModel.Web.WebServiceHost.OnOpening (which processess the ServiceConfig attributes) completely ignores the ServiceConfigurationAttribute if there is an existing service element.

See lines 45 and 58 of WebServiceHost.cpp.

If I set a breakpoint on those lines, and reassign the instruction pointer to call LoadBinding or LoadBehaviors (even though this.HasServiceElement() == true), everything works as I originally expected (per http://wcfrestcontrib.codeplex.com/Wiki/View.aspx?title=Declarative%20Binding%20%26%20Behavior%20Overview&referringTitle=Home)

mikeobrien commented 14 years ago

shaunco wrote on Oct 26 2009 at 3:30 PM: Any chance this can be included in the next release?