Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to apply two Endpoint Behaviors to one behavior configuration?
    primarykey
    data
    text
    <p>This question is a follow up to @joshperry's answer on <a href="https://stackoverflow.com/questions/354727/in-wcf-web-programming-model-how-can-one-write-a-operation-contract-with-an-arra">CustomQueryStringConverter</a>. I implemented this solution with a small modification. My version converts <code>System.Int32[]</code> instead of <code>string[]</code>.</p> <p>However, I have a problem with my WCF configuration. My service dishes out SOAP, XML and JSON. SOAP wasn't a problem, this solution works for XML, but JSON is still messed up. I tried found out that the class that does JSON conversion automatically (<a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.description.webscriptenablingbehavior.aspx" rel="nofollow noreferrer">enableWebScript</a> behavior) is a sealed class, so I can't override it like you did for <code>WebHttpBehavior</code>. I also tried adding two behaviors, but that didn't work either:</p> <pre><code> &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="xmlBehavior"&gt; &lt;ArrayQuerystring /&gt; &lt;/behavior&gt; &lt;behavior name="jsonBehavior"&gt; &lt;ArrayQuerystring /&gt; &lt;enableWebScript /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; </code></pre> <p>I think it might be an ordering issue? If I put the <code>ArrayQuerystring</code> behavior first, I get no results. If I put it second, then I get the same results as the XML endpoint. How do I apply your CustomQuerystringConverter to a JSON endpoint?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload