INFO:ASP 错误代码

[ 2004/11/09 11:18 | by gOxiA ]
概要
本文包含处理 Active Server Pages (ASP) 页面时可能返回的 ASP 错误代码的列表。根据您所使用的 Internet 信息服务 (IIS) 版本的不同,该列表可能会有所不同。
更多信息
ASP 错误代码 说明
ASP 0100 内存不足
ASP 0101 意外错误
ASP 0102 需要字符串输入
ASP 0103 需要数字输入
ASP 0104 不允许此项操作
ASP 0105 下标越界
ASP 0106 类型不匹配
ASP 0107 堆栈溢出
ASP 0108 创建对象失败
ASP 0109 找不到成员
ASP 0110 未知名称
ASP 0111 未知接口
ASP 0112 缺少参数
ASP 0113 脚本超时
ASP 0114 非自由线程对象
ASP 0115 意外错误
ASP 0116 丢失脚本关闭分隔符
ASP 0117 丢失脚本关闭标记
ASP 0118 丢失对象关闭标记
ASP 0119 丢失 Classid 或 Progid 特性
ASP 0120 无效的 Runat 特性
ASP 0121 对象标记中包含无效作用域
ASP 0122 对象标记中包含无效作用域
ASP 0123 丢失 Id 特性
ASP 0124 丢失 Language 特性
ASP 0125 丢失特性的关闭符
ASP 0126 找不到包含文件
ASP 0127 丢失了 HTML 注释的关闭符
ASP 0128 丢失 File 或 Virtual 特性
ASP 0129 未知的脚本语言
ASP 0130 无效的 File 特性
ASP 0131 不允许的父路径
ASP 0132 编译错误
ASP 0133 无效的 ClassID 特性
ASP 0134 无效的 ProgID 特性
ASP 0135 循环包含
ASP 0136 无效对象实例名称
ASP 0137 无效全局脚本
ASP 0138 嵌套的 Script 块
ASP 0139 嵌套的 Object
ASP 0140 Page 命令无序
ASP 0141 Page 命令重复
ASP 0142 线程令牌错误
ASP 0143 无效的应用程序名
ASP 0144 初始化错误
ASP 0145 新建应用程序失败
ASP 0146 新建会话失败
ASP 0147 500 服务器错误
ASP 0148 服务器太忙
ASP 0149 应用程序正在重新启动
ASP 0150 应用程序目录错误
ASP 0151 更改通知错误
ASP 0152 安全错误
ASP 0153 线程错误
ASP 0154 写入 HTTP 头错误
ASP 0155 写入页内容错误
ASP 0156 标头错误
ASP 0157 缓冲已打开
ASP 0158 丢失 URL
ASP 0159 缓冲已关闭
ASP 0160 日志记录失败
ASP 0161 数据类型错误
ASP 0162 不能修改 Cookie
ASP 0163 逗号的使用不正确
ASP 0164 无效的超时值
ASP 0165 SessionID 错误
ASP 0166 未初始化的对象
ASP 0167 会话初始化错误
ASP 0168 不允许的对象使用方式
ASP 0169 丢失对象信息
ASP 0170 删除会话错误
ASP 0171 缺少路径
ASP 0172 无效路径
ASP 0173 无效 Path 字符
ASP 0174 无效 Path 字符
ASP 0175 不允许的 Path 字符
ASP 0176 找不到路径
ASP 0177 Server.CreateObject 失败
ASP 0178 Server.CreateObject 访问错误
ASP 0179 应用程序初始化错误
ASP 0180 不允许的对象使用方式
ASP 0181 无效线程模型
ASP 0182 丢失对象信息
ASP 0183 空 Cookie 关键字
ASP 0184 丢失 Cookie 名称
ASP 0185 丢失默认属性
ASP 0186 解析证书时出错
ASP 0187 对象添加冲突
ASP 0188 不允许的对象使用方式
ASP 0189 不允许的对象使用方式
ASP 0190 意外错误
ASP 0191 意外错误
ASP 0192 意外错误
ASP 0193 OnStartPage 失败
ASP 0194 OnEndPage 失败
ASP 0195 无效服务器方法调用
ASP 0196 不能启动进程外组件
ASP 0197 不允许的对象使用方式
ASP 0198 服务器正在关闭
ASP 0199 不允许的对象使用方式
ASP 0200 'Expires' 特性越界
ASP 0201 无效的默认脚本语言
ASP 0202 丢失代码页
ASP 0203 无效代码页
ASP 0204 CodePage 值无效
ASP 0205 更改通知
ASP 0206 不能调用 BinaryRead
ASP 0207 不能使用 Request.Form
ASP 0208 不能使用一般 Request 集合
ASP 0209 TRANSACTION 属性值非法
ASP 0210 方法未实现
ASP 0211 对象越界
ASP 0212 不能清除缓冲区
ASP 0214 无效路径参数
ASP 0215 ENABLESESSIONSTATE 属性值非法
ASP 0216 MSDTC 服务不在运行
ASP 0217 对象标记中包含无效作用域
ASP 0218 丢失 LCID
ASP 0219 无效的 LCID
ASP 0220 不允许 GLOBAL.ASA 请求
ASP 0221 无效的 @ 命令指令
ASP 0222 无效 TypeLib 规格
ASP 0223 未找到 TypeLib
ASP 0224 无法加载 TypeLib
ASP 0225 无法包装 TypeLibs
ASP 0226 不能修改 StaticObjects
ASP 0227 Server.Execute 失败
ASP 0228 Server.Execute 错误
ASP 0229 Server.Transfer 失败
ASP 0230 Server.Transfer 错误
ASP 0231 Server.Execute 错误
ASP 0232 无效的 Cookie 规格
ASP 0233 无法加载 cookie 脚本源
ASP 0234 无效的包含指令
ASP 0235 Server.Transfer 错误
ASP 0236 无效的 Cookie 规格
ASP 0237 无效的 Cookie 规格
ASP 0238 丢失特性值
ASP 0239 无法处理文件
ASP 0240 脚本引擎异常
ASP 0241 CreateObject 异常
ASP 0242 查询 OnStartPage 接口异常
ASP 0243 Global.asa 中包含无效的 METADATA 标记
ASP 0244 无法启用会话状态
ASP 0245 代码页值的混合使用
ASP 0246 并发用户太多。请稍后重试。
ASP 0247 无效的 BinaryRead 参数。
ASP 0248 脚本未经事务处理。此 ASP 文件必须经过事务处理以使用 ObjectContext 对象。
ASP 0249 不能在 Request 上使用 IStream。使用 Request.Form 集合或 Request.BinaryRead 后不能在 Request 对象上使用 IStream。
ASP 0250 无效默认代码页。指定的应用程序默认代码页无效。
ASP 0251 超过响应缓冲区限制。此 ASP 页的执行造成响应缓冲区超过其配置限制。

IIS帐号同步

[ 2004/11/06 09:57 | by gOxiA ]
一.错误表现
这个错误发生时总会有三方面的表现:一是IE中的最直接的表现,
也是最让人看不懂的表现;二是安全日志中的表现,IWAM_Machine账号登录失败;三是系统日志中的表现,IIS Out-Of-Process Pooled Applications应用程序因启动账号的错误而不能够启动.从而造成ASP页面浏览错误.
(一)IE中的表现
当浏览以前能够正常运行的asp页面时会出现如下的错误:
(1)
网页无法显示
您要访问的网页存在问题,因此无法显示。
---------------------------------------------
请尝试下列操作:
打开 http://127.0.0.1 主页,寻找指向所需信息的链接。
单击刷新按钮,或者以后重试。
HTTP 500 - 内部服务器错误
Internet 信息服务
--------------------------------------------------------------------------------
技术信息(支持个人)
详细信息:
Microsoft 支持
[注意,这儿只是500错误,不是500.xx等错误的,那些错误主要是asp编程问题,与iis没有太大的关系,只有500错误是由iis自身造成的]
(2)
Server Application Error
The server has encountered an error while loading an application during the processing of your request. Please refer to the event log for more detail information. Please contact the server administrator for assistance.
(二)安全日志记录(2条)
事件类型: 失败审核
事件来源: Security
事件种类: 登录/注销
事件 ID: 529
日期: 2001-9-9
事件: 11:17:07
用户: NT AUTHORITY\SYSTEM
计算机: MYSERVER
描述:
登录失败:
原因: 用户名未知或密码错误
用户名: IWAM_MYSERVER
域: MYDOM
登录类型: 4
登录过程: Advapi
身份验证程序包: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
工作站名: MYSERVER

事件类型: 失败审核
事件来源: Security
事件种类: 帐户登录
事件 ID: 681
日期: 2001-9-9
事件: 11:17:07
用户: NT AUTHORITY\SYSTEM
计算机: MYSERVER
描述:
登录到帐户: IWAM_MYSERVER
登录的用户: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
从工作站: MYSERVER
未成功。错误代码是: 3221225578
注:IWAM_MYSERVER,启动进程之外的应用程序的 Internet 信息服务的内置帐号,安装IIS时自动建立,其密码由IIS控制.
(三)系统日志中的记录(2条)
事件类型: 错误
事件来源: DCOM
事件种类: 无
事件 ID: 10004
日期: 2001-9-9
事件: 11:20:26
用户: N/A
计算机: MYSERVER
描述:
DCOM 遇到错误“无法更新密码。提供给新密码的值包含密码中不允许的值。 ”并且无法登录到 .\IWAM_MYSERVER 上以运行服务器:
{3D14228D-FBE1-11D0-995D-00C04FD919C1}
事件类型: 警告
事件来源: W3SVC
事件种类: 无
事件 ID: 36
日期: 2001-9-9
事件: 11:20:26
用户: N/A
计算机: MYSERVER
描述:
服务器未能转入应用程序 '/LM/W3SVC/4/Root'。错误是 'RunAs 的格式必须是<域名>\<用户名>或只是<用户名>
'。
若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp 。
注:3D14228D-FBE1-11D0-995D-00C04FD919C1}实际是IIS Out-Of-Process Pooled Applications 的KEY.也就是代表IIS Out-Of-Process Pooled Applications.
出现IIS 500内部错误的原因有多个,但最主要的原因是IWAM_MACHINE账号在Active Directory(或SAM),IIS的metabase数据库与COM+组件中的密码不匹配不同步最成的.因此解决问题的关键在于使这三方的密码同步起来.
要使这三方的密码同步,有几种办法,下面只介绍最好用的一种,使用IIS自带的脚本进行密码同步(看来微软早就知道这方面的问题了,因此专门做了一个密码同步的脚本.:)):
操作如下:
1.在本地账号管理器或AD用户与计算机中更改IWAM_MACHINE账号的密码.假设我们改为"12345678".[本来这个账号是计算机控制的,非常复杂].
2.使用新的密码重设IIS Metabase数据库.我们需要使用IIS自带的管理脚本adsutil.运行如下的命令:
c:\Inetpub\AdminScripts> adsutil SET w3svc/WAMUserPass 12345678
系统会显示:
WAMUserPass: (String) "12345678"
提示密码更新成功.
通常情况下IIS会自动与系统账号等信息同步,但我发现我的机器上ISUR_MACHINE是同步的,但IWAM_MACHINE总是不同步,因此只好自行修改了.
3.同步COM+账号密码
同样我们要用到IIS的管理脚本synciwam.vbs,这个脚本通常会存在于c:\inetpub\adminscripts下,上一个管理脚本也在这儿放着.
命令如下:
cscript c:\inetpub\adminscripts\synciwam.vbs -v
-v参数是打开详细模式,让我们看到更新的过程,通常会如下显示:
Microsoft (R) Windows Script Host Version 5.6
版权所有(C) Microsoft Corporation 1996-2000。保留所有权利。
WamUserNameIWAM_MYSERVER
WamUserPass12345678
IIS Applications Defined:
Name, AppIsolated, Package ID
w3svc, 0, {3D14228C-FBE1-11d0-995D-00C04FD919C1}
Root, 2,
IISHelp, 2,
IISAdmin, 2,
IISSamples, 2,
MSADC, 2,
ROOT, 2,
IISAdmin, 2,
IISHelp, 2,
Root, 2,
Root, 2,
Out of process applications defined:
Count: 1
{3D14228D-FBE1-11d0-995D-00C04FD919C1}
Updating Applications:
Name: IIS Out-Of-Process Pooled Applications Key: {3D14228D-FBE1-11D0-995D-00C04
FD919C1}
密码同步成功.如果不成功先看一下这个脚本取的IIS的密码正确不正确,如果不正确请重复第二步同步IIS密码.
问题解闷,再打开IIS看看,ASP程序应该能够正常浏览了.

IIS日志删除脚本

[ 2004/10/21 09:07 | by gOxiA ]
How can I delete all files from my IIS log file directory that are over 90 days old?

这个脚本可以从日志目录中删除90天的记录。

Option Explicit
Const GENERAL_FAILURE = 2
Const KillFile=0 ' Set this to 0 to not delete the files, set to 1 to delete the files

Dim ArgObj, Servername, WebSiteID, WebSite, WebSitepath, totalDeleted, MaxAgeOfFileToKeep

Function DeleteOldLogFiles(WebSite,  MaxAgeOfFile)
Dim File, ServerObj, FSO, FolderObj, FileObj, LogFileDir, Deleted, Status, FailedToDelete
Deleted = 0
FailedToDelete= 0
on error resume next
' Attempt to get the web site object from the metabase
Err.clear
Set ServerObj = GetObject(WebSite)
If (Err.Number <> 0) Then
  WScript.Echo \"Error: \" & Err.Description & \" (\" & Err.Number & \")\"
  Exit Function
end if
LogFileDir = ServerObj.LogFileDirectory
Set ServerObj = Nothing
WScript.Echo \"Log file dir for: \" &WebSite & \" = \" & LogFileDir
WScript.Echo \"Delete files over \"& MaxAgeOfFile & \" days old.\"
WScript.Echo \"\"
Set FSO = CreateObject(\"Scripting.FileSystemObject\")
set Folderobj = FSO.GetFolder(LogFileDir)
for each File in Folderobj.files
 if (Date - File.DateCreated > cint(MaxAgeOfFile)) then
        Status = \"Deleting File: \" & File.name & \", Age=\" & formatNumber(Date-File.DateCreated, 0) & \" days, Status=\"
        Err.Clear
        if (KillFile = 1) then
            FSO.DeleteFile(LogFileDir & \"\" & File.Name)
            If (Err.Number <> 0) Then
                   Status = Status & \"Failed : \"& Err.Description & \" (\" & Err.Number & \")\"
                   FailedToDelete = FailedToDelete +1
           else      
                Status = Status & \"Deleted\"
               Deleted = Deleted + 1
            end if
      else
           Status = Status & \"Skipped\"
       end if
       WScript.Echo Status  
 end if
next
DeleteoldLogfiles = Deleted
WScript.Echo \"\"
if (FailedToDelete > 0) then
  WScript.Echo \"There were \" & FailedToDelete  & \" files that could not be deleted.\"
end if
WScript.Echo \"There were \" & Deleted & \" files deleted.\"
end function
Sub DisplayHelpMessage()
   WScript.Echo
   WScript.Echo \"Usage:\"
   WScript.Echo \"      DeleteOldWebSiteLogfiles.VBS MaxDays WebSiteNumber \"
   WScript.Echo
   WScript.Echo \"MaxDays = maximum age in days of files to keep.\"
   WScript.Echo \"WebSiteNumber is the number of the web site, you have two methods to determine this:\"
   WScript.Echo
   WScript.Echo \"#1 = Run FINDWEB.VBS\"
   WScript.Echo \"#2 = Right click the web site, select properties, on the web site tab\"
   WScript.Echo \"     under logging click the Properties button, part of the log file\"
   WScript.Echo \"     name will contain the web site #\"
   WScript.Echo
   WScript.Echo \"     example log filename: W3SVC1\exyymmdd.log  - the web site is 1\"
   WScript.Echo \"                           W3SVC45\exyymmdd.log - the web site is 45\"
   WScript.Echo
   WScript.Echo \"Please visit and support : http://www.iisfaq.com\"
end sub
' Get the Arguments object
Set ArgObj = WScript.Arguments
' Test to make sure there is at least one command line arg - the command
If ArgObj.Count < 2 Then
       DisplayHelpMessage
       WScript.Quit (GENERAL_FAILURE)
End If
Servername = \"LocalHost\"
MaxAgeOfFileToKeep = trim(ArgObj(0))
WebSiteID    = trim(ArgObj(1))
WebSite        = \"W3SVC/\" & WebSiteID
WebSitepath = \"IIS://\" & Servername &\"/\" & WebSite
TotalDeleted = DeleteOldLogFiles(WebSitePath,  MaxAgeOfFileToKeep)
分页: 13/14 第一页 上页 8 9 10 11 12 13 14 下页 最后页 [ 显示模式: 摘要 | 列表 ]