除了要添加引用System.Runtime.Serialization;还要添加System.ServiceModelSystem.ServiceModel.Web 这个两个类库引用完以后应该就知道怎么回事了,这个就不在说了