[英]WCF KnownTypes reference generation
I have a WCF service that has one BaseForm that is inherited numerous time (100+), some (10+) have multi-layered inheritance too. 我有一个WCF服务,该服务具有一个被无数次继承(100+)的BaseForm,一些(10+)也具有多层继承。 All of the derived forms are listed as KnownTypes. 所有派生形式都列为KnownTypes。
The problem I am having is the time it takes for the service to start up and to generate a client reference. 我遇到的问题是服务启动并生成客户端引用所花费的时间。 Using the WCF Test Client as a test it takes about 10 minutes for it to complete. 使用WCF测试客户端作为测试,大约需要10分钟才能完成。 If I don't reference the KnowTypes (or just list a couple) it takes about 1.5 mins to fully complete. 如果我不引用KnowTypes(或仅列出几个),则大约需要1.5分钟才能完全完成。
Is there anyway to see what is going on, why it is taking so long? 无论如何,有没有看到正在发生的事情,为什么要花这么长时间? Or is there a better way than the standard? 还是有比标准更好的方法?
Cheers 干杯
How big is the WSDL generated for your service? 为您的服务生成的WSDL有多大? Depending on how large those known types are, you are potentially including a huge amount of data in the 'service reference' or proxy. 根据这些已知类型的大小,您可能会在“服务引用”或代理中包含大量数据。
Every object that you include as a KnownType
will be added to the WSDL or service metadata. 您作为KnownType
包含的每个对象都将添加到WSDL或服务元数据中。 This will include, at a minimum, 至少包括
When you connect to the service to request metadata, as the WCF test client does when you provide a service URL, it will need to 当您连接到服务以请求元数据时,就像WCF测试客户端在提供服务URL时所做的那样,它将需要
What can you do about this? 您能对此做什么? You probably don't need to do anything. 您可能不需要执行任何操作。 This is a one time operation - once your service client knows the types that will can be sent and received it stores them (as generated code) and reuses them. 这是一次操作-一旦您的服务客户端知道将要发送和接收的类型,它将存储它们(作为生成的代码)并重用它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.