You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: