使用Windows应用程序的Web服务 [英] Web service with windows application

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

问题描述

我之前没有做过这种事情,所以感觉有点摇摇欲坠。我也无法在网上找到足够的知识。

I haven't done this kind of thing before, so feeling a bit shaky about it. And I was also not able to find enough knowledge on the web.

我开发了一个Windows应用程序和Windows应用程序使用的Web服务。因此,在我的Visual Studio中,我已经在我的本地计算机上托管了我的Web服务的Web引用

I have a developed a windows application and a web service that is consumed by the windows application. So in my Visual Studio, I have added a web reference to my web service that is hosted on my local machine

当我打包Windows应用程序并将其发送给客户时,我该如何操作确保我的可执行文件中包含的Web引用引用客户环境中的服务器?我的意思是,Windows应用程序将如何知道本地网络上的Web服务URL是什么?

When I package the windows application and send it to the customer, how do I make sure that the web references that are included in my executable refer to the server on the customer's environment? I mean, how will the windows application know what is the web service URL on the local network?

请回答我的问题,尽管对许多人来说这似乎是微不足道的。

Please do answer my question though it may seem quite trivial to many.

Shyam

推荐答案

Hi Shyam ,

Hi Shyam,

当您通过Visual Studio添加Web引用时,它会生成继承自SoapHTTPClientProtocol的类并设置为其Url属性指向您在"添加Web引用"对话框中提供的URL的默认值。在发布中,您必须手动设置此属性。这完全取决于您在何处存储网络服务的URL。

When you add web reference thru Visual Studio, it generates class inherited from SoapHTTPClientProtocol and sets to its Url property default value pointing to url you've provided in Add Web Reference dialog. In release you'll have to set this property manually. It's completely up to you where to store Url of web service.


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

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