i'm trying to setup a script using classic .asp/vbscript to send an SMS using the eSendex "HTTP Form Post" service.
So far the script is working... here's what it does
Takes the form field values for the calling page
Sends an email
Saves the values into my database
The final thing that I want the script to do is send an SMS by communicating with the eSendex "HTTP Form Post" service, but their API documentation is not very helpful. An example script would have been nice!
If anyone has any experience with eSendex, maybe you could advises me!
Thanks in advance
There are two approaches you can take to communicate with the Esendex Form Post API from ASP.
You can either form an HTTP POST Request yourself and try POSTing the data directly to it, or you could use the EsendexSdk2.dll they provide as part of the ASP SMS SDK: http://www.esendex.co.uk/Developers/Downloads/ASP-SMS-SDK-Download
You can see examples of how to use the EsendexSdk2.dll with ASP here: http://www.esendex.co.uk/Developers/SDKs/ASP-SMS-SDK
In that zip download you'll find a SendMessage.asp example which takes values from fields on a form and calls SendMessage on the SendService.
The alternative HTTP POST Request approach would require you to do something like this SO question: Form post asp classic xmlhttp or this Microsoft support article: http://support.microsoft.com/kb/290591 using ServerXMLHttp from MSXML but I've not tried that method myself so it's just an alternative suggestion to using the DLL.
Your form data that you'd 'Send' in the ServerXMLHttp case would be a form encoded list of the variables like
username=YOURUSERNAME&password=YOURPASSWORD&account=EX000000&recipient=44770000000&body=hello
Feel free to give further examples of how you want to call the Esendex API from your code if it'll help and you can get excellent support from Esendex by emailing support#esendex.com.
Related
I've successfully integrated Facebook Login to my mobile app.
The mobile app has a server-side (ASP.NET) that must implement deletion callback (GDPR) acording to Facebook's guidance.
All works well (Facebook sucessfully calls my method), and I even have the implementation for the signed_request parsing.
HOWEVER - when I try to find the signed request parameter when the method executes, I can't find it!
the Content (Request.Content) of the call looks empty, the Uri doesn't have parameters, and I can't find the actual signed_request anywhere!
What am I missing?
I've tried decoding from Base64, ReadAsString, plain reading, nothing shows the parameter.
It looks like the whole request is empty.
Please advise, how can I find the signed_request in order to send it to my parsing method?
Thank you,
Yaron.
To send a File in AJAX request i used the way mentioned here . How do i write the WebMethod to accept the file?
The post & link provided gives a number of key points, please find them below:
The action being done is a post
The format of the object being sent is json
As your tag's are .net & web-services, you are interested in a solution on Microsoft Stack.
You use the term WebMethod, so you do not want to do this transaction via web api or WCF
See link for details for "Send and Receive JSON objects to Web Service Methods using jQuery AJAX in ASP.Net"
I am using a thirdparty credicard processing company. I am sending amount to pay creditcard number etc to them. They said they will postback the results such as confirmation number to a url provided by me. I have to save the confirmation number in my database. Mine is an asp.net web application. I am wondering what will be best way to provide a url. Should I give an aspx page or create a http handler which will process the data from the third party company?
Thanks
Definitely a generic http handler (.ashx), because it's a lot more lightweight than .aspx.
The basic idea: use .ashx when you don't need to display a web page to end user, otherwise use .aspx.
Should I give an aspx page or create a http handler ... ?
Neither, use a WCF service.
WCF service to accept a post encoded multipart/form-data
I Cant Able to find out correct soltion . Our client is Android and Iphone. now i need to create a webservice for these two client. I dont know even a single step about this. please any one refer any tutorial website or guide to me.I am using .asmx form.And i use C#
At a high level, its very simple. Instead of returning HTML code in response to an HTTP GET or POST, you will now return a JSON string. The real question is how do you create a JSON string from the object that you want to send.
There are several libraries that can take an object and return a JSON string. In python you can use
return simplejson.dumps(<<object name>>)
in php,
echo json_encode(<<object name>>);
Which language are you using?
I'd recommend to do a REST service.
I've accomplished that by using an HTTP Handler (.ashx) and NewntonSoft.Json (just returning the literal string and changing the content type to "application/json".
If you want to be more fancy WCF supports json as well but I found the handler approach to work very well. Also the Json serializer that Newton uses worked better for me than the Microsoft one.
You can get his Json library using Nuget as well as downloading from the site.
Some resources:
http://www.dotnetperls.com/ashx and
http://james.newtonking.com/pages/json-net.aspx
I want to be able to send a simple http post from my firefox extension to my ASP.NET application. From the client side, I have used XMLHTTPRequest by sending the post with the url: http://localhost:15227 which is the url on my ASP.NET app.
What do I need to do to receive a remote request from ASP.NET please?
thanks
This page from Apple has a pretty good example of how to send/receive data using a raw XmlHttpReqeust object (as opposed to a JavaScript library).
You can get the value of the response from the responseText property once you know the response came back successfully. Specifically take a look at where the processReqChange function is defined, your code will go in there (or your equivalent of that function).
If you want to explore JavaScript frameworks, take a look at how much less code you need if you use jQuery get (for example).