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

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

问题描述

我正在使用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.

问题:我需要调用的服务可以在localhost上正常工作,我可以获取wsdl并浏览到它.

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

但是,当我尝试在Visual Studio 2013配置服务参考..."中尝试将url从dev服务器更改为本地时,它给了我Object reference is not set to an instance of an object错误.

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.

有人经历过类似的事情吗? 是什么原因造成的? 我该如何解决?

Has anyone experienced something similar? What is causing this? How do I fix it?

推荐答案

通过删除服务参考,然后添加具有给定URL的新服务参考来解决自己.

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

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

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