WCF 4.5 transport and XmlDictionaryReaderQuotas values not honored on a machine with .net framework 4.0

In order to simply configuration a number of transport property defaults and XmlDictionaryReaderQuotas values were changed in WCF 4.5. For exact details about changes refer this link under topics “New Transport Default Values” and “XmlDictionaryReaderQuotas”.

Note:

These new defaults will be considered only if you deploy the WCF service on a machine with .net framework 4.5. If you deploy the same service on a machine with .net 4.0, then 4.0 defaults only will be considered. In such cases, it is recommended to configure these settings explicitly.

What does that mean?

If you develop a WCF service (target framework 4.0 or 4.5) on a machine with .net framework 4.5 assuming these default values and deploy the same service:

  • On a machine with .net framework 4.0 runtime:  The service will get only .net framework 4.0 defaults which is lesser than 4.5 defaults. So scalability of the service will be reduced to what was supported in WCF 4.0.
  • On a machine with .net framework 4.5 runtime: you should see no issues.