Click here to Skip to main content
15,906,645 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I am developing a application in ASP.NET MVC to send SMS on Mobiles using Twilio API. As you all know it is a paid service to send SMS through Twilio.I want to develop a web application to send free SMS on Mobile like www.way2sms.com Is there any way to Send Free SMS using ASP.Net without using API Like Twilio.

Thanks
Posted
Updated 1-Dec-16 6:55am
Comments
Afzaal Ahmad Zeeshan 1-Dec-16 13:23pm    
No, it is a premium service and you have to pay for that. Otherwise it would decrease the UX, such as showing promotional messages in the SMS; Sent by {Service} for free.

Yes there is a solution.

You need and GSM modem on you server(computer) with a SIM card (could pay a rent for a plan with free sms in any company [sprint, at&t...]). With the plan like on your cellphone you have free unlimited SMS, only pay a rent, better than pay for every single SMS.

GSM MODEMS:
USB (I made test with one like this)
3G WCDMA GSM WIFI 7.2 Mbps HSDPA USB Dongle
ZTE MF190 3 G GSM 7.2 Mbps USB Mobile Broadband Modem

Another with multiple SIMS cards:
Módems USB GSM 8 Puertos bulk sms

And another kind of modem:
M2M módem M2M RS232 Módem Q24plus

The APP (c#):
SMSapplication.zip

First connect to the COM port, the application show the status of the connection, in the second tab "Send SMS" put the cellphone number and the message, then press send.

The code(Button):
C#
private void btnSendSMS_Click(object sender, EventArgs e)
       {

           //.............................................. Send SMS ....................................................
           try
           {

               if (objclsSMS.sendMsg(this.port, this.txtSIM.Text, this.txtMessage.Text))
               {
                   //MessageBox.Show("Message has sent successfully");
                   this.statusBar1.Text = "Message has sent successfully";
               }
               else
               {
                   //MessageBox.Show("Failed to send message");
                   this.statusBar1.Text = "Failed to send message";
               }

           }
           catch (Exception ex)
           {
               ErrorLog(ex.Message);
           }
       }


Send Class:
C#
public bool sendMsg(SerialPort port, string PhoneNo, string Message)
        {
            bool isSend = false;

            try
            {
                
                string recievedData = ExecCommand(port,"AT", 300, "No phone connected");
                recievedData = ExecCommand(port,"AT+CMGF=1", 300, "Failed to set message format.");
                String command = "AT+CMGS=\"" + PhoneNo + "\"";
                recievedData = ExecCommand(port,command, 300, "Failed to accept phoneNo");         
                command = Message + char.ConvertFromUtf32(26) + "\r";
                recievedData = ExecCommand(port,command, 3000, "Failed to send message"); //3 seconds
                if (recievedData.EndsWith("\r\nOK\r\n"))
                {
                    isSend = true;
                }
                else if (recievedData.Contains("ERROR"))
                {
                    isSend = false;
                }
                return isSend;
            }
            catch (Exception ex)
            {
                throw ex; 
            }
          
        }   



I didn't make this app, I found on internet... I made test and It's worked.

To build your web with a gsm modem you have to considerate:
- Have a physical server with the modem connected (could be your computer)
- Pay a rent plan for SMS (Sim cards)
- Pay a static IP, or noIP, din DNS, whatever, to put you server online

The GSM modem recive AT Commands, thats what the c# application does, send the AT commands to the modem.
gsm modem at commands

I hope it helps
 
Share this answer
 
v2
Google is your friend here: Send Free SMS using ASP.Net[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.
 
Share this answer
 
Comments
Member 12003387 29-Sep-15 7:53am    
I know google well;
but note: I want to send messages free of cost, not by using an paid API....

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