.aspx中的Web方法和Web服务中的Web方法(.asmx)之间有区别吗?

编程入门 行业动态 更新时间:2024-10-26 16:28:06
本文介绍了.aspx中的Web方法和Web服务中的Web方法(.asmx)之间有区别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道Web方法重量轻,并且因为没有回发而给你速度。我发现Web方法可以像.asmx web服务文件一样添加到.aspx webform中。有什么区别吗?做或不做的任何优点或缺点?

I know that Web Methods are light weight and gives you speed since there is no post back. I found that a Web Method can be added to a .aspx webform just like in .asmx web service file. Is there any difference ? Any advantage or disadvantage of doing or not doing so?

推荐答案

网络服务不是轻量级的,实际上它们完全相反,因为它们通常接收和响应数据使用XML(庞大的格式)。但是,这使得它们非常易于与其他编程语言一起使用。 Web服务擅长使应用程序与其他编程平台兼容,或者用于向网页提供AJAX请求。还有许多其他用途,但在这些情况下,通常使用WCF或HttpHandler是更好的选择。 web services are not light weight, in fact they are quite the opposite because they generally receive and respond to data using XML (a bulky format). However, this makes them very easy to use with other programming languages. Web services excel at making an application compatible with other programming platforms or for serving up AJAX requests to a web page. There are many other uses, but typically using WCF or HttpHandlers are better options in those cases.

更多推荐

.aspx中的Web方法和Web服务中的Web方法(.asmx)之间有区别吗?

本文发布于:2023-10-07 10:47:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469183.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   区别   aspx   Web   asmx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!