Hi, All
I get the following error when I use the get/post method to pass information between files:
-----
HTTP POST Request:
http://127.0.0.1/Development/Programming/WmlDev/Exercise/Chapter18/TryAgain.asp?0oc=106
Checking for URL '127.0.0.1/Development/Programming/WmlDev/Exercise/Chapter18/Tr
yAgain.asp?0oc=106' in Whitelist not found
POST Data:
UserID=a&Password=s
HTTP Error: 500
-----
This error only occurs with ASP(VBScript), and not with ASP(JScript). I am using the Phone.com's
4.1 simulator with IIS 5.0 on WIN2K. I would greatly appreciate any insight into this
problem-Thanks in advance! Below are the two files that I am using. File 1:
-----
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "
http://www.wapforum.org/DTD/wml_1.1.xml">
<!--
Name: Login.wml
Author: Ivan Vandermerwe
Description: Sending data in HTTP request using WML
Type:
Created: 11.21.01
UpDated: FileUpdated, UpdatedByWho,UpdatedWhat
-->
<wml>
<card id="login" title="Login">
<p>
Name=$(UserID)
<br />
Password=$(Password)
<br />
<a href="#Details" title="Edit" >Edit Details</a>
<br />
Send data via:
<br />
<anchor title="GET">
GET
<go href="Login.asp" method="get">
<postfield name="UserID" value="$(UserID)" />
<postfield name="Password" value="$(Password)" />
</go>
</anchor>
<br />
<anchor title="POST">
POST
<go href="Login.asp" method="post">
<postfield name="UserID" value="$(UserID)" />
<postfield name="Password" value="$(Password)" />
</go>
</anchor>
</p>
</card>
<card id="Details" title="Edit Details">
<p>
Enter Name:
<input name="UserID" title="Name" />
<br />
Enter Password:
<input name="Password" title="Password" />
<a href="#login" title="Done">Done</a>
</p>
</card>
</wml>
-----
File 2:
-----
<%@ language="vbscript" %>
<% Response.ContentType="text/vnd.wap.wml" %>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"
http://www.wapforum.org/DTD/wml_1.1.xml">
<!--
Name: Login.asp
Author: Ivan Vandermerwe
Description: Sending data in HTTP request using WML
Type:
Created: 11.21.01
UpDated: FileUpdated, UpdatedByWho,UpdatedWhat
-->
<wml>
<head>
<meta forua="true" http-equiv="Pragma" content="no-cache" />
<meta forua="true" http-equiv="Cache Control" content="no-cache,must-revalidate"
/>
</head>
<%
if (Request.QueryString("UserID").Count == 1)
{
UserID = Request.QueryString("UserID")
Password = Request.QueryString("Password")
MethodUsed = "GET"
}
if (Request.Form("UserID").Count == 1 )
{
UserID = Request.Form("UserID")
Password = Request.Form("Password")
MethodUsed = "POST"
}
if (UserID == "")
{
%>
<card id="Result" title="Error!">
<p>
You must enter a user name!
</p>
<%
}
else
{
if ((UserID == "Ivan") && (Password == "aitai"))
{
%>
<card id="Result" title="Welcome!">
<p>
Hello, Ivan Vandermerwe!
<br />
<%
}
else
{
%>
<card id="Results"
title="Sorry!">
<p>
<%
Response.Write(UserID) %> invalid!
<br />
<%
}
%>
HTTP method used is: <% Response.Write(MethodUsed) %>
</p>
<%
}
%>
<do type="prev" label="Back">
<prev />
</do>
</card>
</wml>
-----