2 way redirect not working

2 way redirect not working SearchSearch
Author Message
Farhan Anjum
New member
Username: Farhananjum

Post Number: 1
Registered: 05-2009
Posted on Monday, May 25, 2009 - 05:41 pm:   

dear all, i am trying to redirect response of received sms through asp code but it is showing some error. the code is

<%@ Language="VBScript" %>
<% Option Explicit %>
<html>
<head>
<title>Insert into database</title>
</head>
<body>
<%



dim connection
dim sSQL, sConnString



sSQL="INSERT INTO testtable (sen, message) VALUES ('" & request.querystring("sender") & "','" & request.querystring("fullsms") & "')"



sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("testdb.mdb")


'sConnString="Provider=Microsoft.ACE.OLEDB.12.0" & "Data Source=" & Server.MapPath("testdb.accdb")

Set connection = Server.CreateObject("ADODB.Connection")



connection.Open(sConnString)


connection.execute(sSQL)



Connection.Close
Set Connection = Nothing



response.redirect("http://localhost:8811?phonenumber=xxxxxx&text=thanks")



%>
</body>
</html>

......
sms debug file shows some error. can anybody help me to resolve this issue

text/plainsmsdebug
smsdebug.txt (6.6 k)
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 853
Registered: 08-2008
Posted on Wednesday, May 27, 2009 - 05:07 pm:   

Hi,

Sorry for the delay in response!

It looks like the problem is a missing "/" after the port number in the URL.

Change:

http://localhost:8811?phonenumber=

to:

http://localhost:8811/?phonenumber=

(I'm not sure why the "/" is needed in this case, but that does seem to be what is causing the confusion.)

--
Des
NowSMS Support
Farhan Anjum
New member
Username: Farhananjum

Post Number: 2
Registered: 05-2009
Posted on Wednesday, May 27, 2009 - 07:58 pm:   

Thanks a lot Des.It is working fine now. Below mentioned command also worked for me.Instead of calling main frame page i called directly the messaging sending page from asp scrip.
response.redirect("http://localhost:8811/send text message.htm?phonenumber=xxxxx&text=xxxxxxx.")