我的IIS能打开ASP页面,,但不能实现注册功能,,这是怎么回事??是不是与数据库连接有问题

无法显示网页
试图访问的网页出现问题,无法显示。

--------------------------------------------------------------------------------

请尝试执行下列操作:

单击刷新按钮,或稍后重试。

打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务

--------------------------------------------------------------------------------

技术信息(用于支持人员)

错误类型:
Provider (0x80004005)
未指定的错误
/zhuce.asp, 第 139 行

浏览器类型:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)

网页:
POST 138 ??? /zhuce.asp

POST Data:
Element=dsdfs&Element2=&Element3=sdfsdf&Element4=sdfsdf&Element5=sdfsdfs&Element6=dsfsd&Element7=dsfsd&Submit=%CC%E1%BD%BB&MM_insert=form1

时间:
2008年4月24日, 16:07:36

详细信息:
Microsoft 支持

别人教我说:
rs.open sql,conn,1,1 改成 rs.open sql,conn,1,3
但还不会,请会的朋友说详细点,3Q
接上:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用户注册</title>
</head>

<body><br />
<h1 align="center"><font color="#00FFFF" size="+4">用户注册</font></h1>

<form method="post" action="<%=MM_editAction%>" name="form1">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">用户帐号:</td>
<td><input type="text" name="Element" value="" size="32"> </td>
</tr>
<tr valign="baseline">
<td nowrap align="right">用户密码:</td>
<td><input type="password" name="Element2" value="" size="32"> </td>
</tr>
<tr valign="baseline">
<td nowrap align="right">用户真实姓名:</td>
<td><input type="text" name="Element3" value="" size="32"> </td>
</tr>

看看这个!

<%response.buffer=true%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>注册:第二步</title>
<SCRIPT language=JAVASCRIPT>
<!--
function check_Null(){
if (document.form1.username.value==""){
alert("用户名不能为空!");
return false;
}
if (document.form1.password.value==""){
alert("密码不能为空!");
return false;
}
if (document.form1.password.value!=document.form1.password2.value){
alert("密码和密码确认必须一致!");
return false;
}
return true;
}
// -->
</SCRIPT>
</head>
<!--#Include file="conn_adduser.asp"-->

<body bgcolor="#F0FFE6">

<div align="center">
<center>
<table border="0" width="500">
<tr>
<td width="25%" align="center"><b><font color="#0000FF"><a href="../choose.htm">用户登录</a></font></b></td>
<td width="25%" align="center"><b><font color="#0000FF"><a href="../ywlch.htm">业务流程</a></font></b></td>
<td width="25%" align="center"><b><font color="#0000FF"><a href="../zhcyfg.htm">政策与法规</a></font></b></td>
</tr>
</table>
</center>
</div>

<hr color="#0000FF" width="980">
<div align="center">
<center>
<table border="1" width="1%" bordercolor="#800080">
<tr>
<td width="100%" align="center">
<table width="456" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="476" align="center" bgcolor="#FFFFFF">
<table width="457" border="0" bgcolor="#FFFFFF">
<tr>
<td height="40" align="center" width="449"><h3><font color="#AB0000">用户注册</font></h3></td>
</tr>
<tr>
<td height="30" align="center" width="449">第二步 申请用户名(注意:所有带 *
号的项目必须填写)
<hr size="1" noshade>
</td>
</tr>
</table>

</center>

<FORM name=form1 onsubmit="javascript: return check_Null();" action="" method=post>
<TABLE width="455" border=0 cellpadding="4" cellspacing="1" bgcolor="#999999" height="113">
<TR bgcolor="#FFFFFF">
<TD width="70" height="25">
<p align="center">用户名</p>
</TD>
<TD width="359" height="25" align="right">
<p align="left"><INPUT size=15 name="username" class="inputbox">
<FONT color=#990000>* </FONT><font size="2">(大于或等于5位,小于20位)</font></p>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD height="25" width="70">
<p align="center">密 码</p>
</TD>
<TD width="359" height="25">
<p align="left"><INPUT type=password size=15 name="password" class="inputbox">
<FONT color=#990000>* </FONT></p>
</TD>
</TR>
<TR bgcolor="#FFFFFF">
<TD height="33" width="70">
<p align="center">确认密码</p>
</TD>
<TD width="359" height="33">
<p align="left"><INPUT type=password size=15 name="password2" class="inputbox">
<FONT color=#990000>* </FONT></p>
</TD>
</TR>
</table>
<p align="center"> <input type=submit value=" 确 定 " name=submit class="inputbutton">
</FORM>
<center>

<p>
<%
'各项验证正确无误,则可继续注册,否则返回
if request("username")<>"" then
'先检验用户名是否符合规定,0表示符合规定,1表示不符合规定。exit_flag用来记载是否符合规定,temp_str记载提示信息。
Dim exit_flag,temp_str
exit_flag=0
'这里判断是否符合位数
If len(request("username"))<5 or len(request("username"))>20 Then
exit_flag=1
temp_str="<br>用户名必须大于5位小于20位"
End If
'这句话来判断一下是否已经有人使用
sql="select username from 用户 where username='" & request("username") & "'"
set rs=db.execute(sql)
If not rs.eof and not rs.bof Then
exit_flag=1
temp_str="<br>已有人使用该用户"
End If
'如果exit_flag=0表示通过服务器端验证,可以注册,否则不可以注册
IF exit_flag=0 Then
'表示可以注册
Dim username,password,type2
username=request("username")
password=request("password")
type2=request("type2")
sql="insert into 用户(username,password) values('" & username & "','" & password & "')"
db.execute(sql)
session("username")=username '用session记住用户名,以备后面update_3.asp使用。
response.redirect "add_3.asp"
Else
'表示不可以注册,必须重新填写。
response.write "<p><font color='red'>提示:" & temp_str & ",请重新填写</font></p>"
End If
end if

%>
</p>
</td>
</tr>
</table>

</td>
</tr>
</table>

</div>

</body>

</html>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2008-04-24
<form method="post" action="<%=MM_editAction%>" name="form1">

<%=MM_editAction%> 这个肯定你没有连接数据库就直接写出来了

这样肯定会错的!!!!
第2个回答  2008-04-28
首先看是不是服务器的问题

除了zhuce.asp,其他asp文件能正常运行吗

如何可以就要看你zhuce.asp的代码了

<%=MM_editAction%>哪里来的?
zhuce.asp 贴出来看看
第3个回答  2008-04-24
你把zhuce.asp页的源码贴出来看看
第4个回答  2008-04-24
把zhuce.asp代码贴出来