2-way sms with MS XMLHTTP

2-way sms with MS XMLHTTP SearchSearch
Author Message
David
Unregistered guest
Posted on Tuesday, January 18, 2005 - 11:31 am:   

Hi,
I am trying to configure a 2-way sms solution. The following are my steps :
1. Incoming sms to nowsms gateway trigger a asp script (example script1.asp).
2. Based on the info in the @@FULLSMS@@, scrip1.asp execute a response.redirect to script2.asp with the sender and fullsms values.
3. Script2.asp do some work and execute a ms xmlhttp using the "GET" method to nowsms gateway. Here I am trying to use nowsms gateway to send a text sms.

Looking through the smsdebug.log, it seemed that step1 and step2 are ok but step3 generate an error msg, "got unknown response". Below is a partial output of the error msg.

18:56:07:905 [3] HttpResponseWait: Ok
18:56:07:905 [3] RetrieveURL: got unknown response
18:56:07:905 [3] RetrieveURL: HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Tue, 18 Jan 2005 10:56:07 GMT
X-Powered-By: ASP.NET
Connection: close
Content-Length: 376
Content-Type: text/html
Set-Cookie: ASPSESSIONIDSSBQABSD=KPDBJFECMJLBMAGJFDPLCOFO; path=/
Cache-control: private

Then nowsms gateway started to execute step1 again which caused the whole cycle to repeat itself. This keep on going till I stopped the nowsms gateway sms service.

Can someone pls help me here...

thanks

best regards
david
David
Unregistered guest
Posted on Tuesday, January 18, 2005 - 12:44 pm:   

Hi Bryce or somebody,
Pls help urgently...each time i start the sms service, the nowsms gateway start to repeatedly execute the 3 steps below infinitely. I had even rebooted my server and the nowsms gateway still execute the 3 steps whenever I started the sms services. Can somebody help me to stop this???

thanks

best regards
david
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3951
Registered: 10-2002
Posted on Thursday, January 20, 2005 - 10:38 pm:   

Hi David,

NowSMS retries messages for 2-way commands indefinitely, because it is assumed that the 2-way command will always work. And if there is an error that it is a temporary server error.

The received messages are in the SMS-IN directory of the NowSMS server, so you can manually delete them.

The problem is most likely that script2.asp is not returning any type of response. So when IIS runs the script, it performs the actions in the script, but as the script does not return any output, IIS reports "internal server error". You can probably fix this by having your script output any type of response ... as long as it comes back with an HTTP status code of 200 (OK), it will be fine.

-bn
David
Unregistered guest
Posted on Friday, January 21, 2005 - 03:39 pm:   

Hi Bryce,
Yes, u r rite. I forget to strip the country code from the mobile number and this cause an error when the 2nd script tried to write the mobile number into a SQL table.

thank you

best regards
david