iis-7 - 找不到 ASP 包含文件

标签 iis-7 asp-classic

我是一名系统管理员(不是一家公司,只是为一家第三方公司工作),当我从服务器浏览他的网站时,我在服务器端收到错误消息。

Error

Active Server Pages error 'ASP 0126'

Include file not found

/login.asp, line 3

The include file '/includes/connect.asp' was not found

我在 IIS 7 中启用了父路径,但它仍然显示错误。我根本不是 ASP 人,但 IIS 中的所有东西看起来都不错。是他的代码吗?他有什么可以尝试的吗?做研究时有没有感觉这与他的文件路径有关?

谢谢大家

最佳答案

当您尝试查看在 IIS 6 中托管的 ASP 网页时,您可能会收到“ASP 0126”错误消息

请查看来自 MSDN 的这篇文章。决议就在那里。

ASP 0126

只是为了给 Stack Overflow 带来答案。以下是解决方法。

方法一:#include 虚拟语句与绝对文件路径一起使用

要解决此问题,请在 Test.asp 网页中使用 #include 虚拟语句和绝对文件路径。考虑以下代码示例: 以下代码行不起作用。

<!-- #include virtual ="../Date.asp" -->

以下代码行有效。

<!-- #include virtual ="Samples/Includes/Date.asp" -->

方法二:#include file 语句和相对文件路径一起使用

要解决此问题,请在 Test.asp 网页中使用 #include 文件语句和相对文件路径。考虑以下代码示例: 以下代码行不起作用。

<!-- #include virtual ="../Date.asp" -->

下面的代码行确实有效。

<!-- #include file ="..\Date.asp -->

Note By default, parent paths are disabled in IIS 6. To enable parent paths, you must manually set the AspEnableParentPaths property in the metabase to TRUE.

关于iis-7 - 找不到 ASP 包含文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13112362/

相关文章:

asp.net - 如何增加 IIS 进程优先级(对于 w3wp 和 iis apppool)?

asp-classic - Response.Buffer/Flush 似乎不起作用

mysql - 为什么 isNULL 在带有参数化查询的 vbScript 中返回空字符串

javascript - 隐藏输入字段的数组

c# - 多个网站,一个公共(public)代码库和不同的配置文件

c# - C# 中 iPad 和 IIS 之间的 TCP/IP 连接

database - 经典 ASP - 使用 Windows 身份验证的 SQL Server 2008 连接字符串

javascript - form.submit() 花费的时间太长

asp-classic - 在经典 ASP 中写出文件/页面名称

iis-7 - 如何在 IIS 7.5 上安装通配符 SSL 证书