Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
public void send(string uid, string password, string message, string phonenumber)
      {
          HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://ubaid.tk/sms/sms.aspx?uid=" + uid + "&pwd=" + password + "&msg=" + message + "&phone=" + phonenumber + "&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();
      }



Before that i am using this but am getting Remote server Error When i am Used this code,

What I have tried:

hi,

I tried Lots of method but am not getting any message to my Mobile number.Except Twillio ...if anybody know (how to send sms to my mobile number) this Please share correct output link please share your idea.i want to try this please help me


if you know any Referal link share me please
Posted
Updated 22-Apr-16 2:29am
v2
Comments
Richard Deeming 22-Apr-16 8:24am    
And are we supposed to guess what the error is?
Member 11183217 22-Apr-16 8:32am    
I have already written about the error message that I have got -> "Remote server Error".

If anyone have already faced similar problem, than that page link would be useful. OR possible some other way to approach this problem.(to obtain solution)
Richard Deeming 22-Apr-16 8:33am    
"Remote server error" is not the full error. Without the full error, there's any number of possible causes.
Member 11183217 22-Apr-16 8:38am    
An exception of type 'System.Net.WebException' occurred in System.dll but was not handled in user code

Additional information: The remote server returned an error: (404) Not Found.
Richard Deeming 22-Apr-16 8:44am    
That's better! That means the URL you've requested does not exist.

You need to contact the owners of the site to find out how to call their API correctly.

1 solution

Hello,

I have tried the same, not with Twilio, but with Vianett. Register a account for yourself and it gives 5 sms per free use to test.

Send SMS Using ViaNett in C# Application[^]

I am not advertising, just a reference as I have used the same. you can download the code and check as well.

Thanks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900