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 ...
随机推荐
- Global.asax 文件是什么
Global.asax 文件,有时候叫做 ASP.NET 应用程序文件,提供了一种在一个中心位置响应应用程序级或模块级事件的方法.你可以使用这个文件实现应用程序安全性以及其它一些任务.下面让我们详细看 ...
- 去除inline-block元素间间距,比较靠谱的两种办法
1.使用注释符号 <div><span class="1">1</span></div><!-- --><div& ...
- factory service provide自定义服务
1.factory factory , 就是你提供一个方法, 该方法返回一个对象的实例, 对于 AngularJS 的 factory 来说, 就是先定义一个对象, 给这个对象添加属性和方法, 然后返 ...
- 匿名访问ReportService报表服务器(一)
我的数据库版本是sql server 2008 r2,系统环境是windows server2008. 对于sql server 2008 r2上报rs报表的匿名访问问题,我这边尝试过两个可行方案: ...
- 树莓派安装Transmission-daemon出现的问题
1,安装时发现默认的源里面没有transmission-daemon包 pi@fynn:/etc/apt/sources.list.d $ sudo apt-get install transmiss ...
- 如何将C++代码逆向生成类图 (VS2013)
1. 将代码添加到VS2013工程中: 2. 切换到"类视图": 3. 选中项目 右键"视图"->"查看类图". 如果项目文件太多的话 ...
- 说说Statement、PreparedStatement和CallableStatement的异同(转)
1.Statement.PreparedStatement和CallableStatement都是接口(interface). 2.Statement继承自Wrapper.PreparedStatem ...
- 《第一本docker书》- 第一章笔记
环境: Ubuntu 14.04.2 LTS (GNU/Linux 3.16.0-30-generic i686) 第一章: 1 Docker客户端和服务器 2 Docker镜像 添加一个文件,执行一 ...
- View优化
前面写了个View画圆弧,为了让他和底层图片效果融合,采用先把圆弧画到和图片一样大小的画布上,然后用canvas的变换位图方法映射过去. bitmapWithReflection = Bitmap.c ...
- Sublime Text 用法小记
复制当前行: Ctrl + Shift + D 上下移动行: Ctrl + Shift + ↑/↓ 选中行部分: Crtl + Shift + ←/→ 格式化json: Ctrl + Alt + J