注册 登录
编程论坛 ASP技术论坛

ASP在插上网线运行正常,但在不插网线的情况下,运行出错这个是什么问题?应该怎么解决呢?

yi90421 发布于 2008-05-20 13:52, 1238 次点击
ASP测试在插上网线运行正常,但在不插网线的情况下,运行出错这个是什么问题?应该怎么解决呢?
7 回复
#2
yi904212008-05-20 14:01
有高手说是有些页面请示网络资源,但做的时候没弄过,是不是代码错了:


<title>教 师 工 作 量 管 理 系 统</title>
<style type="text/css">
<!--
.STYLE1 {
    font-size: 24px;
    font-weight: bold;
    color: #FF0000;
}
.STYLE2 {font-size: 14px}
-->
</style>
</head>
<SCRIPT language=JavaScript>
function login()
{
 target="login/login.asp";
 window.location.href=(target);
}
</SCRIPT>
<body>
<table width="100%" border="0">
  <tr>
    <td height="118" valign="bottom"><div align="center" class="STYLE1">教 师 工 作 量 管 理 系 统</div></td>
  </tr>
</table>
<form id="user_name" name="user_name" method="post" action="Login/LoginCheck.asp">
<table width="100%" border="0">
  <tr bgcolor="#CCCC99">
    <td height="29" colspan="3"><div align="center" class="STYLE2"> 用 户 登 陆</div></td>
  </tr>
  <tr>
    <td width="49%" height="36"><div align="right">用户名:</div></td>
    <td colspan="2">
      <input name="user_name" type="text" id="user_name" size="15" />    </td>
  </tr>
  <tr>
    <td height="32"><div align="right">密 码:</div></td>
    <td colspan="2">
      <label>
        <input name="user_password" type="password" id="user_password" tabindex="2" size="15" />
       </label>    </td>
  </tr>
   <tr>
    <td height="32"><div align="right">登陆角色:</div></td>
    <td colspan="2">
      <label>
      <select name="user_role" id="user_role">
        <option>教 师</option>
        <option>管 理</option>
      </select>
      </label>    </td>
  </tr>
  <tr align="right" bgcolor="#FFCC99">
    <td height="29" bgcolor="#CCCC99">
      <label>
        <input type="button" name="Submit" value="注册" tabindex="3" onClick='javascript:login();'/>  
      </label>    </td>
    <td width="5%" align="left" bgcolor="#CCCC99">
      <label>
        <input type="submit" name="Submit2" value="登陆" tabindex="4" />
        </label>
      <label></label>    </td>
    <td width="46%" align="left" bgcolor="#CCCC99"><input type="reset" name="Submit3" value="重置" tabindex="5" />      </td>
  </tr>
</table>
</form>
</body>
</html>
#3
yi904212008-05-20 14:02
还有已个是logincheck.asp:代码如下

<!--#include file="..\Data\Data_connect.asp"-->
<%
 uid=trim(Request("user_name"))
 upwd=trim(Request("user_password"))
 role=trim(Request("user_role"))
'判断接受的帐号是否符合要求
if uid="" then
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得为空!');window.history.go(-1);}</script>"
end if
if instr(1,uid,",")>=1 then
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含逗号!');window.history.go(-1);}</script>"
end if
if instr(1,uid,"'")>=1 then
  Response.Write "<script language=JavaScript>{window.alert('登录帐号不得包含单引号!');window.history.go(-1);}</script>"
end if
'判断帐号及密码是否正确
 set recCheckUser=server.CreateObject("ADODB.recordset")
 if role="教 师" then
 strSQL="select * from [user] where name_id='"&uid& "' and password='"&upwd& "'"
 recCheckUser.Open strSQL,conn,1,1
 if not recCheckUser.EOF then
     '如果用户帐号及密码正确
    session("User")=uid
    Session("Department")=recCheckUser("department")
    response.redirect "../Worker/index.asp"
 else
     '用户帐号及密码不正确
      'recCheckUser.Close
      set recCheckUser=nothing
      set conn=nothing
    Response.Write "<script language=JavaScript>{window.alert('您输入的帐号及密码错误,请重新输入!');window.history.go(-1);}</script>"
 end if
 end if
 if role="管 理" then
 strSQL="select * from [admin] where name='"&uid& "' and password='"&upwd& "'"
 recCheckUser.Open strSQL,conn,1,1
 if not recCheckUser.EOF then
     '如果用户帐号及密码正确    
    session("User")=uid
    Session("Department")=recCheckUser("department")
    Session("Role")=recCheckUser("role")
    response.redirect "../System/System_Index.asp"
 else
     '用户帐号及密码不正确
      'recCheckUser.Close
      set recCheckUser=nothing
      set conn=nothing
    Response.Write "<script language=JavaScript>{window.alert('您输入的管理员帐号及密码错误,请重新输入!');window.history.go(-1);}</script>"
 end if
 end if
%>
#4
yi904212008-05-20 14:03
究竟是什么原因造成的呢?
#5
永夜的极光2008-05-20 14:49
看起来和网线没啥关系啊,你用IIS调试的吗?
#6
yi904212008-05-20 14:52
已解决,谢谢
#7
fangchengli2008-05-22 16:47
怎么解决的,,也要说下,,,,不然人家还不是知道,,,,,楼主不厚道
#8
multiple19022008-05-24 13:10
本来想说的,被楼上说了。
1