问题描述
如何从asp.net Web应用程序发送短信?
How to send SMS from asp.net web application?
是否有必要从任何提供商那里购买?
Is it necessary to buy from any provider?
可以发送短信的数量是否有限制?
Is there any limitation of number of SMS can be sent?
是否应将发送SMS代码写在不同的线程中,以便在发生任何异常/延迟主线程的情况下不会受到影响?
Should sending SMS code be written in different thread so that in case of any exception/delay main thread will not be affected?
任何人都可以提供代码示例以及其工作原理的概念吗?
Can anybody please provide code sample as well as concept of how it works?
推荐答案
您将需要利用某种电话提供商来实现此目的.我个人是 Twilio 的忠实拥护者.它们是非常合理的价格,并且公开了 API 和语言特定的API包装器. .NET特别有几种,其中包括官方的一种.
You will need to utilize some sort of telephony provider to achieve this. I personally am a big fan of Twilio. They are very reasonable rates and expose an API with language specific API wrappers. .NET in particular has several, including an official one.
可在此处获得代码示例和演练.
Code samples and walkthroughs are available here.
对性能的影响是最小的,因为您实质上构造了传递给Twilio端点的XML消息.繁重的工作不再是您的肩负,因为它更多地是一种传递和接收XML消息的系统.
The performance impact is minimal, as you essentially construct an XML message that gets passed to a Twilio endpoint. The heavy lifting is off your shoulders as its more a system of passing and receiving XML messages.
希望如此,这是一个非常容易使用的平台.
Hope that helps, it is a very easy platform to work with.
这篇关于如何通过Asp.net Web应用程序发送SMS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!