WCF known types gotcha

KnownType: if you use this at the base class level everything will work as expected

ServiceKnownType : one of the issue with serviceknowntype is that if you decorate it at the service implementation level(class) or the method implementation, it does not have any effect, the compiler does not throw any error, but during runtime the client call will fail(underlying connect closed), the solution is to always use the ServiceKnownType attribute on the service interface or the method in the interface.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: