配置服务引用... - 对象引用未设置为对象的实例 [英] Configure Service Reference... - Object reference is not set to an instance of an object

查看:22
本文介绍了配置服务引用... - 对象引用未设置为对象的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2013.NET4.5.

原本我是WCF服务消费者,但由于团队缺乏处理子系统的资源,我接手了WCF服务双方的开发.所以我得到了我需要调用的 WCF 服务的代码,现在尝试插入它以在我的本地系统上调试它.

Originally I was WCF service consumer but due to lack of resources in team that deals with subsystem I took over development of both sides of WCF service. So I got Code of the WCF service that I need to call and now trying to plug it in to debug it on my local system.

问题:我需要调用的服务在本地主机上运行正常,我可以获取 wsdl 并浏览它.

Issue: Service that I need to call works on localhost fine I can get wsdl and browse to it.

但是,当我尝试在 Visual Studio 2013 '配置服务引用...' 并尝试将 url 从开发服务器更改为本地时,它给了我 对象引用未设置为对象的实例 错误.

However when I try in Visual Studio 2013 'Configure Service Reference...' and Try to change url from dev server to local it gives me Object reference is not set to an instance of an object error.

有没有人遇到过类似的情况?这是什么原因造成的?我该如何解决?

推荐答案

通过删除服务引用解决了自己,然后添加了给定 URL 的新服务引用.

Solved myself by deleting Service Reference, and then adding new Service Reference with given URL.

这篇关于配置服务引用... - 对象引用未设置为对象的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆