ASP Include file not found

与世无争的帅哥 提交于 2019-12-12 21:12:48

问题


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.

Error

Active Server Pages error 'ASP 0126'

Include file not found

/login.asp, line 3

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

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?

Thanks guys


回答1:


You may receive an "ASP 0126" error message when you try to view an ASP Web page that is hosted in IIS 6

Please check this post from MSDN. Resolutions are there.

ASP 0126

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

Method 1: Use the #include virtual statement together with an absolute file path

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" -->

The follow line of code works.

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

Method 2: Use the #include file statement together with a relative file path

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" -->

The following line of code does work.

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


来源:https://stackoverflow.com/questions/13112362/asp-include-file-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!