c#:使用fullonsms api发送消息
我试图从一个C#网站发送消息到电话号码。我使用了短信api的完整版本。尝试了这么多次,但消息不仅发送c#:使用fullonsms api发送消息,c#,C#,我试图从一个C#网站发送消息到电话号码。我使用了短信api的完整版本。尝试了这么多次,但消息不仅发送 using System; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net;
public partial class _Default : System.Web.UI.Page
{
string uid;
string password;
string message;
string no;
protected void Page_Load(object sender, EventArgs e)
{
}
//This is the code of API for sending message.
public void send()
{
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + no + "&provider=fullonsms");
HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse();
System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());
string responseString = respStreamReader.ReadToEnd();
respStreamReader.Close();
myResp.Close();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
uid = "";
password = "";
message = TextBox2.Text;
no = TextBox1.Text;
send();
TextBox2.Text = "";
TextBox1.Text = "";
}
catch (Exception ex)
{
ex.Message.ToString();
}
}
我已经用我的号码注册了fullosms。但是没有得到解决方案。有人请帮忙您确认WebRequest是否在该URL中工作了吗?这个问题是重复的。检查一下它是否解决了您的问题。先生,请告诉我为什么它不起作用?我对asp.net很陌生