通过Web服务连接2个应用程序 [英] connect 2 application via web service

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

问题描述

salam
我创建了一个程序(clent-server)通过网络service发送视频和聊天.到现在为止一切正常,因为我在一台PC上使用它.但是我的问题是如何使它与2台PC一起工作some1告诉我,我必须使用iis并必须对其进行配置才能工作.我的问题是如何控制ip地址,这意味着我必须使用文本框设置ip并在需要时进行更改,但我没有找到放置此文本框的位置仅在app.config地址中找到:http://localhost/service.asmx.这样就可以在app.config中创建http://textbox/service.asmx.
我希望你能理解我想要的.
最好的问候

salam
i created a programe(clent-server)to send video and chat via web service.till now everything is ok because im using it in one PC.but my problem how can i make it work with 2 PC some1 told me that i have to use iis and must configur it to work.and my problem is how can i control the ip adress it means that i have to use textbox to set the ip and change when i want but i didn''t find where i put this textbox i found only in app.config adresse:http://localhost/service.asmx. so is it possible to make in app.config http://textbox/service.asmx.
i hope that u will understand what i want.
best regards

推荐答案

据我了解,在.NET中,客户端和服务器部分都是您的.是的,经典的Web服务将是a脚的(或麻烦的,过时的东西).您最好使用WCF. Microsoft坚持认为,对于所有新开发,都应将Web服务(非WCF)视为已过时,并且我同意,并补充说,与其他系统(基于Java的系统以及更多系统)之间的互操作性可能需要过时的Web服务.如果不是您的情况,请一定使用WCF.

现在,您应该在IIS中托管WCF吗?真的要看例如,如果您已经将IIS用作Web服务器,则可以将其用于承载WCF.如果承载WCF是IIS的唯一目的,则应该知道可以很容易地在服务应用程序(大概是Windows服务)中自承载WCF.

请参阅:
http://msdn.microsoft.com/en-us/library/bb332338.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/ms733766%28v = vs.100%29.aspx [ ^ ].

祝你好运,
—SA
As I understand it from the question, both client and server parts is yours, both in .NET. Is so, the classical Web service would be a lame (or a hassle, the obsolete thing). You should better use WCF. Microsoft maintains that Web services (non-WCF) should be considered obsolete for all new development, and I would agree, adding that the obsolete Web services might be needed for interoperability with other systems (Java-based and a lot more). If this is not your case, certainly use WCF.

Now, should you host WCF in IIS? It really depends. If you are already using IIS as a Web server, for example, you can use it for hosting WCF. If hosting of WCF is the only purpose of IIS, you should know that you can quite easily self-host WCF in the service application (presumably, a Windows service).

Please see:
http://msdn.microsoft.com/en-us/library/bb332338.aspx[^],
http://msdn.microsoft.com/en-us/library/ms733766%28v=vs.100%29.aspx[^].

Good luck,
—SA


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

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