WcfRestContrib icon indicating copy to clipboard operation
WcfRestContrib copied to clipboard

WebDispatchFormatter should have an option to not throw ConfigurationException (shaunco)

Open mikeobrien opened this issue 15 years ago • 1 comments

In order to support both SOAP and REST with a single ServiceContract (interface) that is shared between both .svc files, the WebDispatchFormatter attribute needs to be added to the methods inside the ServiceContract... The issue with this is that the SOAP .svc doesn't make use of the WebServiceHostFactory, which causes WebDispatchFormatterBehavior to throw a ConfigurationErrorsException.

In order to allow this, I suggest adding a constructor parameter to WebDispatchFormatterAttribute named "allowDormant", which will instruct WebDispatchFormatterAttribute to instruct WebDispatchFormatterBehavior that it is ok if the behavior is unable to apply the dispatch behavior.

I have attached a zip file containing the proposed change. The files in the zip are based on Change Set 25579.

mikeobrien avatar Aug 11 '10 18:08 mikeobrien

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

mikeobrien avatar Aug 11 '10 18:08 mikeobrien