将Web引用添加到项目时出现错误 [英] Getting Error when adding web reference to my project

查看:83
本文介绍了将Web引用添加到项目时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我向我的项目添加Web服务参考时,我收到错误..



       错误 下载 'http:  //   localhost:42030 / Service1.asmx'。 
无法 to connect to the 远程 服务器
connection be made ,因为 target machine active 拒绝 127 0 0 1:42030
错误 下载 'http: // localhost:42030 / Service1.asmx / $ metadata'。





请帮助我解决方案

元数据'。





请帮助我


这是因为当您在此时添加Web引用时,它会检查该Web URL是否可用且可ping,但在您的情况下,您尝试添加一些本地Web URL,这是在您添加Web Reference的那一刻不会生效。

让您的web Servive(Service1.asmx)保持运行模式,然后尝试添加Web Reference。


when i am adding web service refrence to my project than i am getting error..

There was an error downloading 'http://localhost:42030/Service1.asmx'.
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 127.0.0.1:42030
There was an error downloading 'http://localhost:42030/Service1.asmx/$metadata'.



kindly help me

解决方案

metadata'.



kindly help me


It is because when you are adding the Web Reference at that time it checks for that Web URL to be live and pingable, but in your case you are trying to add some local Web URL which is not live at the moment you are adding Web Reference.
Keep your web Servive(Service1.asmx) in running mode and then try to add Web Reference.


这篇关于将Web引用添加到项目时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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