使用 Windows Communication Foundation/Web 服务与用于简单桌面应用程序到服务器通信的简单 .aspx 页面相比有什么好处? [英] Any benefits of using Windows Communication Foundation/ Web Services vs. a simple .aspx page for simple Desktop app-to-server communication?

查看:26
本文介绍了使用 Windows Communication Foundation/Web 服务与用于简单桌面应用程序到服务器通信的简单 .aspx 页面相比有什么好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 VB6 应用程序,它将与网络服务器进行一些非常简单的通信(传递值并返回一个答案.低带宽和不经常使用).

I'm working on a VB6 app that will do some very simple communication with a web server (passing value and getting back an anwer. Low bandwith and infrequent use).

有人建议使用 WCF 或 Web 服务.我想知道与仅发布到 ASPX 页面相比有什么优势:

Someone suggested using WCF or Web Services. I'm wondering what the advantages are vs. just posting to an ASPX page like:

Myserver.com/Functions.ASP?FunctionName=GetValue?UserName=BubbGump并返回一些简单、易于解析的文本,例如每行一个值.

Myserver.com/Functions.ASP?FunctionName=GetValue?UserName=BubbGump and returning some simple, easy to parse text, like one value per line.

推荐答案

ASP.NET 和 VB.NET 中的 WCF 简介 有这样的花絮:

WCF(或 Windows 通信Foundation)是技术的结合由微软开发,使其开发人员可以更轻松快捷地构建分布式应用程序.周转基金建立在现有技术的基础上ASMX、.NET 远程处理、MSMQ 和 DCOM.WCF 试图统一这些技术和利用的力量所有,同时简化流程实施.

WCF (or Windows Communication Foundation) is a union of technologies developed by Microsoft to make it easier and quicker for developers to build distributed applications. WCF builds on the existing technologies of ASMX, .NET Remoting, MSMQ and DCOM. WCF attempts to unify these technologies and harness the power of all, while simplifying the process of implementation.

ASP 联盟的

Windows Communication Foundation 简介 指出以下内容:

Introduction to Windows Communication Foundation from ASP Alliance notes the following:

Windows 通信基础(WCF),在微软代号 Indigo,是最后一代服务面向开发的技术.它提供了所有最新的方法帮助开发者构建面向服务的应用程序.服务的结果面向设计是一种分布式在服务和服务之间运行的系统客户.视窗通讯基础是微软的基础设施面向服务的架构.

Windows Communication Foundation (WCF), codenamed Indigo in Microsoft, is the last generation of service oriented technologies for development. It provides all the latest means to help developers build service oriented applications. The result of service oriented design is a distributed system which runs between services and clients. Windows Communication Foundation is Microsoft infrastructure for Service Oriented architecture.

您可能曾使用过 Web.NET 1.x 或 2.0 中的服务,并且可能有一些 Remoting 的经验.Windows 通信基础是一个增强技术以提供相同的功能,更好的功能并减少时间开发分布式系统.网络服务和服务不是完全相同的.一个主要区别是 Web服务使用 HTTP 协议,但服务可以使用任何协议,这是一个重要的区别.

You have probably worked with Web Services in .NET 1.x or 2.0 and may have some experiences with Remoting. Windows Communication Foundation is an enhanced technology to provide the same functionality with better features and reduces the time to develop a distributed system. Web Services and Services are not identical. One main difference is Web Services use HTTP protocol, but Services can use any protocol and this is an important difference.

最后,如果您确实使用了 URL,那么

Lastly, if you do use URLs, then

Myserver.com/Functions.ASP?FunctionName=GetValue?UserName=BubbGump

应该

Myserver.com/Functions.ASP?FunctionName=GetValue&UserName=BubbGump

作为?是注释 URL 的结尾,而 &是查询字符串键/值对的分隔符.另一点是 WCF 不需要通过 IIS 的请求,这在某些方面可能很有趣,因为那里可能存在问题.经典 ASP 可能有很多问题,特别是如果有那些On Error Resume Next"行使请求进入僵尸模式,直到机器完全崩溃.

as the ? is notes the end of the URL while the & is the delimiter on the querystring key/value pairs. Another point is that WCF doesn't require requests to go through IIS which may be of interest in some ways as there can be issues there. Classic ASP can have numerous problems especially if there are those "On Error Resume Next" lines that make the requests go into a zombie mode of just running until the machine crashes completely.

这篇关于使用 Windows Communication Foundation/Web 服务与用于简单桌面应用程序到服务器通信的简单 .aspx 页面相比有什么好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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