找不到ASP包含文件 [英] ASP Include file not found

查看:148
本文介绍了找不到ASP包含文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am a Systems Administrator (not for a company just work for a 3rd party company), and having an issue with an error that i receive on the server side when browsing his website from the server.

错误

Active Server Pages错误'ASP 0126'

Active Server Pages error 'ASP 0126'

找不到包含文件

/login.asp,第3行

/login.asp, line 3

找不到包含文件'/includes/connect.asp'

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

我在IIS 7中启用了父路径,但是仍然可以消除错误.我根本不是一个ASP专家,但是IIS中的所有内容看起来都不错.是他的密码吗?他有什么可以尝试的吗?在进行研究时感觉与他的文件路径有关吗?

I enabled parent paths in IIS 7 but it stills errors out. I am not a ASP guy at all, but all things in IIS looks ok. Is it his code? Anything he could try? Had a feeling doing research that it has something to do with his paths to his file?

谢谢大家

推荐答案

当您尝试查看IIS 6中承载的ASP网页时,您可能会收到"ASP 0126"错误消息

请从MSDN检查此帖子.解决方案在那里.

Please check this post from MSDN. Resolutions are there.

ASP 0126

只需将答案带给堆栈溢出即可.以下是解决方法.

Just to bring the answer to Stack Overflow. Below are the workarounds.

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

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

To work around this issue, use the #include virtual statement together with an absolute file path in the Test.asp Web page. Consider the following code examples: The following line of code does not work.

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

下面的代码行有效.

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

方法2:将#include文件语句与相对文件路径一起使用

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

To work around this issue, use the #include file statement together with a relative file path in the Test.asp Web page. Consider the following code samples: The following line of code does not work.

<!-- #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.

这篇关于找不到ASP包含文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆