【发布时间】:2011-12-06 01:07:05
【问题描述】:
根据以下文章,我将我的服务合同定义为
[ServiceContract]
public interface IServiceContract
{
[OperationContract]
Task<string> HelloAsync(string name);
}
但是,当我尝试生成代理时,我收到消息 Type 'System.Threading.Tasks.Task`1[System.String]' cannot be serialized。
我错过了什么吗?
【问题讨论】:
-
您使用的是异步 CTP 吗?该语法还不是 C# 的一部分
-
@JohnSaunders 是的,我正在使用 ctp
标签: wcf asynchronous