Arun Potti

Arun Potti

  • 167
  • 11k
  • 796.2k

Error in Sending SMS to mobile using Way2SMS in ASP.Net c# application

Aug 25 2012 10:00 AM
I am using the following code to send sms using way2sms and i am getting the following error,

Using System.IO;
Using System.Net;
public void send(string uid, string password, string message, string no)
  {
  try
  {
  HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password +
"&msg=" + message + "&phone=" + no + "&provider=way2sms"); HttpWebResponse myResp = (HttpWebResponse)myReq.GetResponse(); System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream()); string responseString = respStreamReader.ReadToEnd(); respStreamReader.Close(); myResp.Close(); }
  catch (Exception er)
  {
  MessageBox.Show(er.Message);
  }

 Error:
 System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
  at System.Net.HttpWebRequest.GetResponse()
  at SMS.Form1.send(String uid, String password, String message, String no)

Can any one help how to handle this error ??

Thanks in Advance.

Answers (2)