如何在Windows服务中使用Web服务? [英] How Do I Consume A Web Service In Windows Service?

查看:121
本文介绍了如何在Windows服务中使用Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i将使用Windows服务中的Web服务。

以下代码在Windows窗体中正常工作,但在Windows服务上失败

Hi,
i would consume a web service in windows service.
the following code work right in windows form, but fails on windows service

Dim myservice As servicenamespace.serviceclass
myservice =new servicenamespace.serviceclass
Dim return_string As String =myservice.method("")







i不会获得任何例外。

你可以帮帮我吗?

谢谢




i don't obtain any exceptions.
can you help me?
thanks

推荐答案

您可以添加服务参考(在解决方案资源管理器中右键单击'参考'
You can add a Service Reference (right mouse click on 'References' in Solution Explorer


这篇关于如何在Windows服务中使用Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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