Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem is probably caused by Visual Studio's edit and continue feature. Visual Studio spins up an IIS Express or Cassini instance with your WCF service and when accessed for the first time, the WCF service initializes (this is when the container is created and when the <code>GetKnownTypes</code> method is called).</p> <p>But when adding new types and recompiling, Visual Studio changes the assemblies of the WCF service, but doesn't restart that AppDomain, keeping the web service initialized (since initialization only happens once) but with an invalid configuration.</p> <p>You can solve this by killing the IIS Express instance every time you start to debug, but of course this is quite annoying. Perhaps you can automate this, but at least the problem will never exist in production, since there's no edit and continue.</p> <p>Nowadays I usually don't expose my commands and queries as part of the WCF contract anymore. The client and server now just send JSON objects back and forward, while what the WCF service is concerned, it's just a string. Sending JSON over the wire has proven to be very beneficial to me, because:</p> <ul> <li>The serializer of JSON.NET is much more flexible than WCF's SoapSerializer (which is just utter pain). JSON.NET can serialize/deserialize immutable objects, collections, dictionaries, simply everything you'll ever need.</li> <li>Not exposing command and query objects as part of the WCF contract removes the complete edit and continue problem completely.</li> </ul>
    singulars
    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.
    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