首页 新闻 会员 周边

WCF 传递 DataSet 出错

0
悬赏园豆:100 [已关闭问题] 关闭于 2017-06-18 19:39

“System.ServiceModel.EndpointNotFoundException”类型的未经处理的异常在 mscorlib.dll 中发生
其他信息: 没有终结点在侦听可以接受消息的 http://localhost:40123/TestService.svc。这通常是由于不正确的地址或者 SOAP 操作导致的。如果存在此情况,请参阅 InnerException 以了解详细信息。

如果传入 DataTable 就没问题。

相关代码如下

SqlDataAdapter adapter = new SqlDataAdapter(com);
DataSet ds = new DataSet("Test");
                            
DataTable dt = new DataTable("TEST1");
com.CommandText = "SELECT * FROM TEST1";
adapter.Fill(ds, "TEST2");

com.CommandText = "SELECT * FROM TEST2";
adapter.Fill(ds, "TEST2");


PushDataInput pushDataInput = new PushDataInput();
pushDataInput.Token = Config.ClientToken;
pushDataInput.Data = ds;
                            
service.PushData(new PushDataRequest(pushDataInput));
    [DataContract]
    public class PushDataInput : BaseInput
    {
        [DataMember]
        public DataSet Data { get; set; }
    }
WCF
月光木叶的主页 月光木叶 | 菜鸟二级 | 园豆:431
提问于:2017-06-18 18:08
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册