|
使用WinSock协议录制脚本,Init中录制的是启动浏览器,连接到目的主页的操作,回放时出错,
错误提示:
vuser_init.c(26): Error : socket0 - Software caused connection abort.
Error code : 10053.
出错的语句:
lrs_receive("socket0", "buf4", LrsLastArg);
对应的Buffer:
recv buf4 1483
"HTTP/1.1 200 OK\r\n"
"Server: Microsoft-IIS/5.0\r\n"
"Date: Fri, 07 Jan 2005 03:10:19 GMT\r\n"
"Content-Length: 1289\r\n"
"Content-Type: text/html\r\n"
"Expires: Fri, 07 Jan 2005 03:10:19 GMT\r\n"
"Cache-control: Private\r\n"
"\r\n"
"\n"
"<HTML><head>\n"
"<script language=\"JavaScript\">\n"
"<!--\n"
"function form_onsubmit(obj)\n"
"{\n"
"var error;\n"
"error=\"\";\n"
"ValidationPassed = true;\n"
"if(obj.UserName.value==\"\")\n"
"{\n"
"\terror=error+\"请输入用户名!\\n\";\n"
"}\n"
"if(obj.PassWord.value==\"\")\n"
"{\n"
"\terror=error+\"请输入密码!\\n\";\n"
"}\n"
"if(error!=\"\")\n"
"{\n"
"\talert(error);\n"
"\tValidationPassed = false;\n"
"\treturn;\n"
"}\n"
"return true;\n"
"}\n"
"-->\n"
"</script>\n"
"<link rel=\"stylesheet\" href=\"WebCSS.css\"
type=\"text/css\">\n"
"</head>\n"
"<BODY topMargin=0 onload=\"form1.UserName.focus();\"
BACKGROUND=\"\">\n"
"<center><br><br>\n"
"<form name=\"form1\" method=\"post\"
action=\"LoginProcess.asp\" onSubmit="
"\"return ValidationPassed\">\n"
"\t<table align=center border=1 borderColor=silver
borderColorDark=#ffffff "
" bgColor=#E2E2E2 cellPadding=4 cellSpacing=0>\n"
"\t <tr><td align=center background=\"images/bg1.gif\">--开发网 · 登录--<"
"/td></tr>\n"
"\t <tr><td height=25>用户名称:<input type=\"text\"
name=\"UserName\" sty"
"le=\"width:100px;font-size:12px\" class=input></td></tr>\n"
"\t <tr><td height=25>你的密码:<input type=\"password\"
name=\"PassWord\""
" style=\"width:100px;font-size:12px\"
class=input></td></tr>\n"
"\t <tr><td align=\"center\" height=40> \n"
"\t <INPUT src=\"img/login.gif\" type=image
onclick=\"form_onsubmit(th"
"is.form);\">\n"
"\t </td></tr>\t \n"
"\t</table>\n"
"</form>\n"
"<p><a href=\"/help/index.htm\"
target=\"_blank\">帮助查看</a></p>\n"
"</center>\n"
"</BODY>\n"
"</HTML>"
出错时运行日志里的信息:
vuser_init.c(26): lrs_receive(socket0, buf4)
vuser_init.c(26): fiInitRecv: socket: socket0 (496), buffer: buf4, expected
size: 1483
vuser_init.c(26): callRecv: Tue Jan 11 15:27:54.480: About to read 1483
bytes from socket0 (496)
vuser_init.c(26): fiPerformReceive: Tue Jan 11 15:27:54.480: Waiting
for readable socket 10 secs, 0 usecs
vuser_init.c(26): fiPerformReceive: Tue Jan 11 15:27:54.490: Trying to
read 8192 bytes
vuser_init.c(26): Error : socket0 - Software caused connection abort.
Error code : 10053.
请问出现这种错误原因一般是什么?如何解决?
日志里第二行显示了 “expected size: 1483”,那为什么在倒数第二行里还会显示“Trying to read 8192 bytes”?
callRecv、fiPerformReceive、fiPerformReceive都是windows API函数吗?
[ Last edited by bsd3000 on 2005-1-12 at 17:15 ] |
|