我可以在WCF命名管道上傳遞COM接口嗎?我可以在WCF命名管道上傳遞COM接口嗎?
我有以下的COM接口:
[CoClass(typeof(ConfigViewerClass))]
[Guid("E51C677A-163B-11D4-AFE4-00902743BD1F")]
public interface ConfigViewer : IConfigViewer{}
當我試圖把它作爲返回類型在我的WCF,我發現了以下錯誤:
There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).
這是爲什麼?
我嘗試以下,但失敗:
- 變化TransferMode到流。
- 封裝定義爲這個COM接口的
[DataContract]
- 通行證空instace(用於較小的流量尺寸)C#類內的COM接口
[DataMember]
。 - 添加KnownType屬性 - 導致編譯錯誤,因爲它COM類:
Attribute 'KnownType' is not valid on this declaration type. It is only valid on 'class, struct' declarations.
謝謝!
來自tracer的任何有用信息? – Reniuz
@Reniuz恐怕不是.. –
將所有KnownTypes添加到您的服務接口? – Reniuz