| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1145 人关注过本帖
标题:请帮忙看下,这个源码有错误没有,运行出现500错误
只看楼主 加入收藏
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
结帖率:92.31%
收藏
已结贴  问题点数:1 回复次数:5 
请帮忙看下,这个源码有错误没有,运行出现500错误
<!--#include file="../Include/Const.asp"-->
<!--#include file="../Include/ConnSiteData.asp"-->
<%Response.Charset="gbk"%>
<%
Call SiteInfo()
if DateDiff("s",session("time"),now())<Refresh then
   response.write "<script language='JavaScript'>alert('防刷新机制启动:请不要在 "&Refresh&" 秒内重复刷新!');" & "history.back()" & "</script>"
   response.end
else
   session("time")=now()
end if
dim rs,sql
dim MesName,Content,SecretFlag,mMemID,mLinkman,mSex,mCompany,mAddress,mZipCode,mTelephone,mFax,mMobile,mEmail,CheckCode
MesName=trim(request.form("MesName"))
Content=trim(request.form("Content"))
if trim(request.form("SecretFlag"))="1" then
  SecretFlag=1
else
  SecretFlag=0
end if
mMemID=request.QueryString("MemberID")
mLinkman=trim(request.form("Linkman"))
mSex=trim(request.form("Sex"))
mCompany=trim(request.form("Company"))
mAddress=trim(request.form("Address"))
mZipCode=trim(request.form("ZipCode"))
mTelephone=trim(request.form("Telephone"))
mFax=trim(request.form("Fax"))
mMobile=trim(request.form("Mobile"))
mEmail=trim(request.form("Email"))
CheckCode = Trim(request.form("CheckCode"))
dim ErrMessage,ErrMsg(9),FindErr(9),i
  ErrMsg(0)="请填写留言主题。"
  ErrMsg(1)="请正确填写留言内容,不能少于1个字符。"
  ErrMsg(2)="请填写您的称呼。"
  ErrMsg(3)="请正确填写单位名称、联系地址。"
  ErrMsg(4)="请正确填写邮政编码。"
  ErrMsg(5)="请正确填写联系电话、传真号码、手机号码。"
  ErrMsg(6)="电子信箱格式错误。"
  ErrMsg(7)="验证码不能为空,请返回检查。"
  ErrMsg(8)="您在【会员注册】页面停留的时间过长,导致验证码失效。\n请返回并刷新【会员注册】页面重新注册!"
  ErrMsg(9)="您输入的验证码和系统产生的不一致,请重新输入。"
if len(MesName)>100 Or len(MesName)=0 then
  FindErr(0)=true
end if
if len(Content)<1 then
  FindErr(1)=true
end if
if len(mLinkman)>50 Or len(mLinkman)=0 then
  FindErr(2)=true
end if
if len(mCompany)>100 Or len(mAddress)>100 Or len(mCompany)=0 Or len(mAddress)=0 then
  FindErr(3)=true
end if
if len(mZipCode)<>6 then
  FindErr(4)=true
end if
if len(mTelephone)>50 Or len(mFax)>50 Or len(mMobile)>50 Or len(mTelephone)=0 Or len(mFax)=0 Or len(mMobile)=0 then
  FindErr(5)=true
end if
if not IsValidEmail(mEmail) then
  FindErr(6)=true
end If
If CheckCode = "" Then
    FindErr(7)=true
End If
If Trim(Session("CheckCode")) = "" Then
    FindErr(8)=true
End If
If CheckCode <> Session("CheckCode") Then
    FindErr(9)=true
End If
for i = 0 to UBound(FindErr)
  if FindErr(i)=true then
    ErrMessage=ErrMessage+ErrMsg(i)+"\n"
  end if
next
if not (ErrMessage="" Or isnull(ErrMessage)) then
  WriteMsg(ErrMessage)
  response.end
end if
set rs = server.createobject("adodb.recordset")
sql="select * from test_Message"
rs.open sql,conn,1,3
rs.addnew
rs("MesName")=StrReplace(MesName)
rs("Content")=StrReplace(Content)
rs("MemID")=mMemID
rs("Linkman")=StrReplace(mLinkman)
rs("Sex")=mSex
rs("Company")=StrReplace(mCompany)
rs("Address")=StrReplace(mAddress)
rs("ZipCode")=StrReplace(mZipCode)
rs("Telephone")=StrReplace(mTelephone)
rs("Fax")=StrReplace(mFax)
rs("Mobile")=StrReplace(mMobile)
rs("Email")=mEmail
rs("SecretFlag")=SecretFlag
If MesViewFlag = 0 Then
rs("ViewFlag"&Language)=0
Else
rs("ViewFlag"&Language)=1
End If
rs("AddTime")=now()
rs.update
rs.close
set rs=Nothing
Call SiteInfo()
If MesViewFlag = 0 Then
    response.write "<script language='javascript'>alert('留言成功提交,但系统已被设置为审核可见,请等待管理员审核、回复!');location.replace('MessageList.asp');</script>"
Else
    response.write "<script language='javascript'>alert('留言成功提交,请等待管理员回复!');location.replace('MessageList.asp');</script>"
End If
%>
搜索更多相关主题的帖子: 运行 源码 
2010-03-30 08:56
cnfarer
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:179
帖 子:3330
专家分:21157
注 册:2010-1-19
收藏
得分:0 
你的错误很可能是由于数据连接或执行错误引起的!

★★★★★为人民服务★★★★★
2010-03-30 14:36
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
请把详细的错误信息也贴出来。
2010-03-30 15:20
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 
不能上传图片,我把源文件帖上来


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
 
<html>
 
    <head>
        <link rel="stylesheet" type="text/css" href="ErrorPageTemplate.css" >
 
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
        <title>HTTP 500 内部服务器错误</title>
 
        <script src="errorPageStrings.js" language="javascript" type="text/javascript">
        </script>
        <script src="httpErrorPagesScripts.js" language="javascript" type="text/javascript">
        </script>
    </head>
 
    <body onLoad="javascript:expandCollapse('infoBlockID', true); initGoBack(); navCancelInit(); initMoreInfo('infoBlockID');">
 
        <table width="730" cellpadding="0" cellspacing="0" border="0">
 
        <!-- Error title -->
            <tr>
                <td id="infoIconAlign" width="60" align="left" valign="top" rowspan="2">
                    <img src="info_48.png" id="infoIcon" alt="信息图标">
                </td>
                <td id="mainTitleAlign" valign="middle" align="left" width="*">
                    <h1 id="mainTitle">网站无法显示该页面</h1>
                </td>
            </tr>
 
 
 
            <tr>
                <!-- This row is for HTTP status code, as well as the divider-->
                <td id="http500Align" class="errorCodeAndDivider" align="right"><ID id="http500">&nbsp;HTTP 500</ID>
                    <div class="divider"></div>
                </td>
            </tr>
 
 
        <!-- Error Body -->
            <tr>
                <td>
                    &nbsp;
                </td>
                <td id="likelyCausesAlign" valign="top" align="left">
                    <h3 id="likelyCauses">最可能的原因是:</h3>
                    <ul>
                        <li id="causeSiteMaintenance">该网站正在进行维护。</li>
                        <li id="causeSiteError">该网站有程序错误。</li>
                    </ul>
                </td>
            </tr>
 
        <!-- What you can do -->
            <tr>
                <td>
                    &nbsp;
                </td>
                <td id="whatToTryAlign" valign="top" align="left">
                    <h2 id="whatToTry">您可以尝试以下操作:</h2>
                </td>
            </tr>
 
        <!-- refresh page -->
            <tr>
                <td>
                    &nbsp;
                </td>
                <td id="refreshPageAlign" align="left" valign="middle">
                    <h4>
                        <table>
                          <tr>
                              <td valign="top">
                                  <img src="bullet.png" border="0" alt="" class="actionIcon">
                              </td>
                              <td valign="top">
                                  <span id="navCancelContainer"></span><noscript id="refreshPage">刷新该网页。</noscript>
                              </td>
                          </tr>
                        </table>
                    </h4>
                </td>
            </tr>
 
 
        <!-- back to previous page -->
            <tr>
                <td >
                    &nbsp;
                </td>
                <td id="goBackAlign" align="left" valign="middle">
                    <h4>
                        <table>
                          <tr>
                              <td valign="top">
                                  <img src="bullet.png" border="0" alt="" class="actionIcon">
                              </td>
                              <td valign="top">
                                  <span id="goBackContainer"></span><noscript id="goBack">返回到上一页。</noscript>
                              </td>
                          </tr>
                        </table>
                    </h4>
                </td>
            </tr>
 
 
        <!-- InfoBlock -->
            <tr>
                <td id="infoBlockAlign" align="right" valign="top">
                    &nbsp;
                </td>
                <td id="moreInfoAlign" align="left" valign="center">
                    <h4>
                        <table>
                            <tr>
                                <td valign="top">
                                    <a href="#" onclick="javascript:expandCollapse('infoBlockID', true); return false;"><img src="down.png" id="infoBlockIDImage" border="0" class="actionIcon" alt="详细信息"></a>
                                </td>
                                <td valign="top">
                                    <span id="moreInfoContainer"></span>
                                    <noscript><ID id="moreInformation">更多信息</ID></noscript>
                                </td>
                            </tr>
                        </table>
                    </h4>
 
                    <div id="infoBlockID" class="infoBlock">
                        <p id="errorExplanation">此错误(HTTP 500 内部服务器错误)意味着您正在访问的网站出现了服务器问题,此问题阻止了该网页的显示。</p>
                        <p id="moreInfoSeeHelp">有关 HTTP 错误的详细信息,请参阅帮助。</p>
                    </div>
 
                </td>
            </tr>
 
 
        </table>
    </body>
</html>
2010-03-30 16:54
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
图片附件: 游客没有浏览图片的权限,请 登录注册

IIS(Internet信息服务)->网站->默认网站->属性->主目录选显卡->配置按钮->调试选显卡->选择向客户端发送详细ASP错误消息(参考图片的设置)
然后再运行看看错误信息是什么,接下来把错误信息贴上来。
2010-03-31 08:59
故事人生
Rank: 2
等 级:论坛游民
帖 子:58
专家分:36
注 册:2010-3-30
收藏
得分:0 

我是用的良精的免费企业版.的用的ASP专业调试工具本地调试的
下面是良精的下载地址,还有

http://www.
2010-04-01 08:18
快速回复:请帮忙看下,这个源码有错误没有,运行出现500错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019006 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved