WCF Failed to invoke the service. Possible causes: The service is offline or inaccessible
今天写WCf 时遇到如下报错:
调试过程发现,各个过程都无异常,但是返回给调用端数据时出现如下错误。
Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.

最后检查,导致此错误的原因是
[DataContract]
public class Student
{
[DataMember]
public int PersonId { get; }
[DataMember]
public string Name { get; set; }
}
改成如下就好了:
[DataContract]
public class Student
{
[DataMember]
public int PersonId { get;private set; }
[DataMember]
public string Name { get; set; }
}
wcf 服务序列化只读属性会出现问题,导致Failed to invoke the service.
WCF Failed to invoke the service. Possible causes: The service is offline or inaccessible的更多相关文章
- com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method findUserByUserNo in the service wusc.edu.facade.user.service.PmsUserFacade.
017-04-25 10:55:30,505 INFO [AbstractRegistry.java:302] : [DUBBO] Register: consumer://192.168.1.101 ...
- 关于dubbo调度时出现Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method insertTestTb in the service cn.cuibusi.core.service.TestTbService.的解决办法
在用dubbo跨项目调度service时出现如下错误: 错误原因:pojo没有实现序列化 解决方法:在pojo实现序列化接口即可
- com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method
查看了网友们的错误原因, 需要进行实例化的类没有进行实例化,具体没有实例化的类会在错误信息中显示,在错误信息中搜索“Serializable”即可找到将其实现序列化可消除错误. 是在使用Dubbo提供 ...
- [TODO]com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method
异常信息如下: 2018-10-30 20:00:50.230 ERROR java.util.concurrent.ExecutionException: com.alibaba.dubbo.rpc ...
- bubbo调用Failed to invoke remote method异常解决
bubbo调用服务异常: com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: getPlanFlowInfo, pr ...
- com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method解决方法
报错日记: Caused by: com.alibaba.dubbo.rpc.RpcException: Failed to invoke remote method: getUserAuthLeve ...
- Docker: Failed to get D-Bus connection: No connection to service
Issue: When you execute systemctl command in docker container, you may receive following error. Erro ...
- dubbo+zookeeper报错:com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method可能的错误原因有三个前两个是从网上摘得, 第三个是自己解决的 1.需要进行 ...
- Initialization failed for Block pool <registering> (Datanode Uuid unassigned) service to IP1:8020 Invalid volume failure config value: 1
2017-02-27 16:19:44,739 ERROR datanode.DataNode: Initialization failed for Block pool <registerin ...
随机推荐
- lua闭合函数
function count( ... ) return function( ... ) i = i+ return i end end local func = count(...) print(f ...
- 全自动ARP实时绑定BAT文件
全自动ARP实时绑定BAT文件 说明一下,这个BVS脚本,它会每六秒钟清除一次ARP缓存.并绑定网关.真正做到了实时防护! 代码如下:请另存为.BAT文件.再运行一下,就可以了 path c:\;c: ...
- 利用windows服务+timer或者windows任务计划程序+控制台进行进行每日邮件推送
1.邮件发送代码 using System.Text; using System.Net; using System.Net.Mail; using System.Reflection; using ...
- iOStextFiled判断输入长度
个人在开发当中发现在用textField的代理方法 -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(N ...
- 《CODE》书摘
2016-11-08 14:59:16 可以说英语词汇就是一种编码. 2016-11-08 15:19:04 实际上任何两种不同的东西经过一定的组合都可以代表任何种类的信息. 2016-11-08 1 ...
- s1=s1+1与s1+=1的区别
刚看到一面试题,题目是这样的:short s1=1;s1=s1+1;有什么错?short s1=1;s1+=1;有什么错? 初看之下就是s1=s1+1和s1+=1的区别.在开发中我们基本上是使用后一种 ...
- webservice jsonp格式调用
前端 $.ajax({ type: "get", url: "http://baiduzd.yihu.com.cn/APIS ...
- 【Java学习笔记】Map接口的子接口---TreeMap
TreeMap,与TreeSet类似,可以对集合中的元素进行排序,同时保持元素的唯一性. 应注意,Comparable(实现接口,记得覆盖comparaTo方法),Comparator的使用. imp ...
- 拼sql条件时判断 是不是当前时间是不是周五,如果今天不是周五,就选上周五
if (Request.QueryString["start"] == null) { for (int i = 0; i < 6; i++) { if (DateTime. ...
- 页面点击任意js事件,触发360、IE浏览器新页面
在<head></head>标签中 <base target=_self> 不会再增加页面