how to send SMS using asp.net

Discussion in 'ASP.NET / ASP.NET Core' started by danielliu8, Oct 29, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I try to build a asp.net mobile application to send SMS to any cellular phone user. But only success to send SMS to TMobile user.

    Can anyone tell how to send SMS to most cellular phone usersby using asp.net?

    Any module, web services or 3rd party platform?

    Thanks

    Daniel liu
    asp.net webdeveloper
    www.DiamondBarWeb.com
     
  2. Bruce

    Bruce DiscountASP.NET Staff

  3. Thanks, Bruce,

    Actually, I read these two articles this week by searching internet. Both not working:

    There is no any valid link in http://www.aspnetpro.com/thirdparty/showfile.asp?FileID=1775. I can not see or download anything from this article.

    http://www.codeproject.com/aspnet/SendingSMS.asp is a good article, butit's web services only works for 5 small Mobile providers. Can not send SMS to any big mobile providers like TMobile, Sigular, ATT..., so it is not good web service to send SMS in USA and Canada.

    Is there any way to send SMS to most cell users in north america? either by free or paid web services, or can any .net programmer create a SMS gateway from asp.net?

    thanks a lot for your feedback.

    daniel liu
    asp.net web developer
    www.DiamondBarWeb.com
     
  4. Bruce

    Bruce DiscountASP.NET Staff

  5. Bruce

    Bruce DiscountASP.NET Staff

  6.  
  7. Thanks,

    I checked http://www.clickatell.comand registered, but did nto find a way to send SMS from my asp.net application, would you please tell detail howuse clickatell http post in asp.net? Is it a xml web services or com object?

    Thanks a lot.


    daniel liu



    asp.net web developer


    www.DiamondBarWeb.com
     
  8. Thanks a lot, Mohda,


    sorry that I was busy with a another deadline project which just finished yesterday.


    Thanks for your code,questions to your code:


    1.
    How can I send my custom SMS title and message from your code? I did not find any to,cc,bcc, title, body... property in your code.


    2.
    How can I get valid "Session_ID"?


    thanks a gain for your help.
    daniel liu



    asp.net web developer


    www.DiamondBarWeb.com
     
  9. Hi Daniel,
    This Link will show you the full documentation of how to send SMS using HTTP with clickatell.com

    http://www.clickatell.com/downloads/Clickatell_http_2.2.2.pdf

    Sending SMS will be same as the code below, but the URL will be changed and more parameters sould be supplied.

    Getting Valide Session id also same as the code but the URL will be different.

    First at all, you need to register with clickatell.com and then create new API ID after you login.
    This API will be used later to get the Valide Session ID which will used in all other commands ( such as SendSMS, PING, getbalance, ... etc )


    --------------
    This function will return Valide Session ID

    ----


     
  10. Thanks a lot, Mohammed Ali

    1.
    I tried to run your code, error for "readBuff not defined."


    Therefore, I added "Dim readBuff(256) As [Char]"





    2.


    Had a hard time to login to clickatell.com to create API ID, I do not have any Client ID, I only have my userName and password, any suggestion?





    thanks a lot.


    daniel
     
  11. Yes, I forgot the declaration part for variables

     
  12. Thanks a lot,


    I got API-ID, and tried to run your code, but "ConvertUnicodeScreenDataToUCS2MessageData" not declared,
    Is it possible for you to post the complete code to send SMS from asp.net?

    Thanks again for your help.

    daniel
     
  13. thanks a lot,


    I run your code like following:


    ******************************************************


    Try


    Dim sessionID As String = mobileClass.ClickatellGetConnected


    If sessionID <> "" Then


    mobileClass.ClickatellSendNormalSMS(sessionID, "test from daniel", "5107598888", "EN", "[email protected]")


    End If


    Catch ex As Exception


    lblError.Text = ex.Message


    End Try


    ****************************************


    and get Errorin ClickatellGetConnected function:


    "The underlying connection was closed: The proxy name could not be resolved, verify correct proxy configuration."


    I think maybe because I did not get valid API_ID?(when I create API_ID, I input our web hoster's IP Address, is this the problem?)


    thanks a lot for your help.


    daniel
     
  14. Ignore ConvertUnicodeScreenDataToUCS2MessageData , because it's for ARABIC and i am using it to convert arabic characters to unicode.
    Just ignore it .
    Below are two methods, Once to Check your clickatell balance and second to check the delivery for a message .

     
  15. daniel? did you removed the proxy part as i mentioned before ?
    Are you behine proxy server or you have direct connection to Internet?
     
  16. I use our testserver which connect to internet throughour network,


    I comment out all the proxy code from both ClickatellGetConnected andClickatellSendNormalSMS functions, now the error is:


    ERR: 007, IP Lockdown violation
    Is it the API_iD problem?

    thanks a lot.

    daniel
     
  17. You can't do anything if you didn't get the API_ID.
    First and before anything you should get API_ID from your account with clickatell.com
    And then you need to remove the IP Lock Down from your preference in your HTTP product.
    Make it blank.
    You only need to give the name for the product in HTTP/S.

    I'll ask a qutesion? Do you have the permission to install custom dll componenets on your hosting server?
    If yes, then i advice you to install COM Object componenet on server and use the interorp in .NET to use this componenet. It'll be more easy than using the HTTP/S Protocol (httpwebresponse and webrequest).

    You can download the Com Object from : http://www.clickatell.com/downloads/COM-API_Installer.exe
    And here is the link for documentation for this com object.

    http://www.clickatell.com/downloads/Clickatell_com_2.2.1.pdf

    But also you need first to create API_ID for COM Object product.

    Thanks
     
  18. I have my API_ID, but I doubt it is a valid, since when I create API_ID, i have to input web server's IP address. But I am testing from my laptop, Is this a problem?


    Do not understand how to "remove the IP Lock Down from your preference in your HTTP product. Make it blank.
    You only need to give the name for the product in HTTP/S.".


    I checked your code, there is no code for IP Lock Down.


    ANother thinking is, I am testing in USA, is clickatell.com works in USA? and how many Carrier they covered? I am testingT-Mobile internet phone now.


    We can not install any com in our hoster server,


    any suggestion to make it works?


    thanks great fro your help.


    daniel liu


    owner


    www.diamondbarweb.com
     
  19. Hi,
    I tried to send an SMS to my friend Mobile In USA but didn't arrive,
    But you can check the coverage from the URL below

    http://www.clickatell.com/brochure/coverage.php

    And about IP LockDown,
    Login to CLickatell.com Web Site and thengo to products, and select HTTP/S, in perefernce, remove the IPD address from IP LockDown field.
    I think you've entered the IP address when you create the API_ID. Just remove it from the HTTP/S Configuration from Clickatell web site.
     
  20. I removed lock down, and send again, seems works, no any error message, but my mobile phone did not receive any SMS.


    It showes the T-Mobile covered.


    something wrong?


    thanks a lot.


    daniel
     
  21. Could you please give me the return string of calling of procedure : ClickatellSendNormalSMS ?
     
  22. Sorry that I am out of office this week, I will tell the return string of calling of procedure : ClickatellSendNormalSMS next week.


    Thanks again, have a nice weekend.


    daniel liu
     
  23. I am back,


    Here is the error:


    When I call


    Dim sessionID As String = mobileClass.ClickatellGetConnected, error occured at


    "Dim myHttpWebResponse As HttpWebResponse = CType(myHttpWebRequest.GetResponse(), HttpWebResponse)",


    Error message:


    "The underlying connection was closed: The remote name could not be resolved."





    Seems SessionID problem, it worked fine last week to get SessionID and call mobileClass.ClickatellSendNormalSMS function, but it not working now.


    Any suggestion?


    (I contacted Clickatell.com, they have no response for the problem.)


    Thanks a lot for your help.


    daniel liu
     
  24. welcome back,


    This is proxy problem i think.


    Are you behind proxy?


    If yes, they i think you put the proxy server in httpproxy, am right?


    Could you please post your code.


    (In case you put the proxy name such as "myproxy:8080" then you need to add "myproxy" to file services C:\WINDOWS\system32\drivers\etc
    Regards
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page