-
Notifications
You must be signed in to change notification settings - Fork 2.1k
XML DataContract Formatter can fail to write when instance type != declaredType #1081
Comments
Related to #1073 |
This doesnt work when DeclaredType is a base type and the actual RuntimeType is derived from the previous type. In WebAPI we return a 500 and put the exception in the response body for this scenario. |
FYI: Response in case of WebAPI:
|
This is because you need to add http://stackoverflow.com/questions/8555089/datacontract-and-inheritance |
…nce type != declaredType. Adding Functional tests appropriately.
Checked in - 4c951cc |
The formatter only looks at the declared type to make a decision about if a type is writeable, but can fail later at writing if the instance is invalid.
The text was updated successfully, but these errors were encountered: