100分求助一个怪问题啊!

Yjanuary 2005-07-07 11:32:47
错误 '80020009'
发生意外。
/news/dfrx_xw_makeindex.asp,行6

这是怎么回事啊?

index_mb是个模板
dfrx_xw_makeindex.asp是生成静态页面的,一点击就生成
原先是没有什么问题
可是有一次在index_mb修改了一下,新插入一个图片,生成的时候就出现这个问题了!
而且只要新加东西就出现这个问题
但是是时好时坏的,经常是过了一会,就又好了!
是怎么回事啊??
...全文
136 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
Yjanuary 2005-07-07
  • 打赏
  • 举报
回复
dfrx_xw_makeindex.asp代码如下

<!--#include file="conn/login_check.asp"-->

<%
filename="../index.htm"

if request("body")<>"" then ‘这是第六行啊
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(""&filename&""))
fout.Write request("body")
fout.close
set fout=nothing
set fso=nothing
mskrindex="ok"
end if

%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Application("biaoti")%></title>
<LINK href="css/style.css" type=text/css rel=stylesheet>

<SCRIPT LANGUAGE="JavaScript">
helpstat = false;
stprompt = true;
basic = false;
function thelp(swtch){
if (swtch == 1){
basic = false;
stprompt = false;
helpstat = true;
} else if (swtch == 0) {
helpstat = false;
stprompt = false;
basic = true;
} else if (swtch == 2) {
helpstat = false;
basic = false;
stprompt = true;
}
}

function AddText(NewCode) {
document.frmAnnounce.body.value+=NewCode
}

function openscriphtml()
{
if (navigator.appName!="Microsoft Internet Explorer")
alert("此功能 Netscape 用户不能使用!")
else
{newwin=window.open('html_editor.htm','','width=544,height=294');
newwin.focus();
}
}
function runEx(){
//alert('请注意,按下确定将生成页面,按下后请稍后....');
var winEx = window.open("", "winEx", "width=300,height=200,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx.document.open("text/html", "replace");
winEx.document.write(unescape(event.srcElement.parentElement.children[2].value));
winEx.document.close();
}
</SCRIPT>
<script language="Javascript">
<!-- hide

function insertsmilie(smilieface){

document.frmAnnounce.body.value+=smilieface;
}
// -->
</script>
</head>
<body topmargin="0" leftmargin="0" bgcolor="#E1F4EE">
<%if mskrindex="ok" then%>
<%Response.Write "<script>alert(""首页生成成功,请刷新后首页!"");location.href=""dfrx_xw_makeindex.asp"";</script>"%>
<%else%>
<div align="center">
<center>
<table border="1" cellspacing="1" style="border-collapse: collapse" width="100%" height="100%" bordercolor="#B6E0DA">
<form name="frmAnnounce" method="post" action="dfrx_xw_makeindex.asp">
<tr>
<td width="100%" bgcolor="#B6E0DA" height="50">
<b><font color="#066B95"> <img border="0" src="images/Icon_Tree.gif"> 生成首页  生成文件:</font><a class=JyDownSort target="_blank" href="<%=filename%>"><font color="#066B95"><%=filename%></font></a><font color="#066B95"> ,模版文件:indexmb/index_mb.asp</font></b></td>
</tr>
<tr>
<td bgcolor="#E1F4EE" height="300" align="center" valign="top">
<textarea style="width:533; height:300;" rows="19" name="body" cols="102" class="smallinput"><!--#include file="indexmb/index_mb.asp"--></textarea><br><br><br><input name="change" class=button value="生成东风热线首页" type='submit'></td>
</tr>
<tr>
<td width="100%" bgcolor="#B6E0DA" height="50">
<p align="center">
</td>
</tr>
</form>
</table>
</center>
</div>
<%end if%>
</body>
</html>

body是个文本框,里面带入的的<!--#include file="indexmb/index_mb.asp"-->index_mb.asp页面
index_mb.asp这个页面没有问题啊!可是只要在这个页面里修改了东西,点击dfrx_xw_makeindex.asp页面生成静态页面时就出现上面的问题了啊!
经常是过了一段时间又突然好了!
但是一修改又出错了啊!
wangwm 2005-07-07
  • 打赏
  • 举报
回复
没有代码?巧妇难为无米之炊啊
游陆 2005-07-07
  • 打赏
  • 举报
回复
见识了!给着楼主学到东西了!
游陆 2005-07-07
  • 打赏
  • 举报
回复
见识了!给着楼主学到东西了!
Yjanuary 2005-07-07
  • 打赏
  • 举报
回复
谢孟子老大!
果然是这样
我的index_mb.asp文件超过了100k啊!
结帐!谢谢老大!
还有,老大你的blog的网址是多少啊??
Yjanuary 2005-07-07
  • 打赏
  • 举报
回复
我的form没有加<form enctype="multipart/form-data">啊
难道要加?
<form name="frmAnnounce" method="post" action="dfrx_xw_makeindex.asp?action=add" enctype="multipart/form-data">
我加了之后,就没有出现这个问题了
可是生成的静态页面却是空白啊!!
Response.Write request.Form("body")
由于数据量太大,堆栈溢出!

孟子老大,能说详细吗啊?
对于生成静态我不是很明白啊!
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
可以参考
http://blog.joycode.com/ghj/archive/2003/12/26/9943.aspx

http://support.microsoft.com/?id=260694
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
可以参考
http://blog.joycode.com/ghj/archive/2003/12/26/9943.aspx

http://support.microsoft.com/?id=260694
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
解决办法

http://www.baidu.com/s?wd=%D4%DAForm%D3%F2%D6%D0Post%B4%F3%D3%DA100K%B5%C4%CA%FD%BE%DD&cl=3
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
解决办法

http://www.google.com/search?hl=zh-CN&newwindow=1&q=%E5%9C%A8Form%E5%9F%9F%E4%B8%ADPost%E5%A4%A7%E4%BA%8E100K%E7%9A%84%E6%95%B0%E6%8D%AE&btnG=%E6%90%9C%E7%B4%A2&lr=lang_zh-CN
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
知道了,你的内容太多了,超过了100k
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
看到了,没有那样


Response.Write request.Form("body")
看看
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
你的form是不是这样写了?
<form enctype="multipart/form-data">
Yjanuary 2005-07-07
  • 打赏
  • 举报
回复
我把判断的条件改了一下
原先是根据文本框body是否为空来判断的,现在改为
If Request("action") = "add" Then
了,这时提示的错误是
Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: 'fout.write'

错误行是 fout.Write request("body")
这个大家应该知道吧??
应该怎么改啊?
大家帮帮忙啊!
Yjanuary 2005-07-07
  • 打赏
  • 举报
回复
晕!
不是Set fout = fso.CreateTextFile(server.mappath(filename))这句有问题啊!
我用Response.Write (server.mappath(filename))了
可是根本没有执行到这句啊!
是 if request("body")<>"" then
这句出问题了,问题是

错误 '80020009'
发生意外。

怎么回事啊?应该是生成静态的时候出错了啊!
但生成静态的就是下面几句话啊
filename="../index.htm"

if request("body")<>"" then ‘这是第六行啊
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fout = fso.CreateTextFile(server.mappath(""&filename&""))
fout.Write request("body")
fout.close
set fout=nothing
set fso=nothing
mskrindex="ok"
end if
我的模板文件index_mb.asp没有出错,直接在地址栏里敲没有问题
各位老大,帮帮忙啊!
尚和空四 2005-07-07
  • 打赏
  • 举报
回复
对输出看看
能看出问题的
seraph2 2005-07-07
  • 打赏
  • 举报
回复
楼上说的有道理,不过会不会是IIS服务器配置问题呢?IIS设置权限过高,造成客户端创建对象失败,这是我的观点,仅代表本人自己!
孟子E章 2005-07-07
  • 打赏
  • 举报
回复
你先打印出来
Response.Write server.mappath(filename))
看路径是否正确

Set fout = fso.CreateTextFile(server.mappath(filename))

孟子E章 2005-07-07
  • 打赏
  • 举报
回复
Set fout = fso.CreateTextFile(server.mappath(filename))
xuqingz 2005-07-07
  • 打赏
  • 举报
回复
重你的描述中看不出什么地方程序有问题

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧