2

I'm having a WCF service with wsHttpBinding. The service contract interface is declared with ServiceKnownTypeAttribute as:

[ServiceKnownType("GetKnownTypes", typeof(Helper))]
public interface IService1

The GetKnownTypes method returns a collection of 75 types.

I've tried connecting the service with ServiceKnownType and without ServiceKnownType.

It's causing around 2.3 minutes to connect with ServiceKnownTypeAttribute and less than 1 second without it.

If I don't use ServiceKnownTypeAttribute then I've to write minimum 3 APIs for each class i.e. around 225 APIs :(.. with ServiceKnownTypeAttribute the max APIs I've written are 10, which works excellent.

Can anybody suggest a solution?

carlosfigueira
  • 85,035
  • 14
  • 131
  • 171
ni3a
  • 461
  • 2
  • 7
  • 10
  • As far as I've observed, the 75+ DTOs declared in ServiceKnownTypeAttribute are causing issue. Let me know if anyone is aware of a better solution than using DataContracts and ServiceKnownTypeAttribute.. using web.config for declaring KnownTypes is not helpful. – ni3a Sep 13 '13 at 11:19
  • For further information.. The behavior was spotted on Windows 8 OS.. The wcf service works fine when tried on Windows 7. – ni3a Sep 17 '13 at 15:42

0 Answers0