Problems with including files for ASP in IIS 7.5

thanks for taking the time to read this question of mine, which I'm sure is a school boy error but for the life of me, cannot see it.I have an ASP page which has the following contents:\[code\]<!-- #include file="include.asp" --><%Dim ConfigFileConfigFile = Left(Request.ServerVariables("URL"), InStr(Request.ServerVariables("URL"),"/framework/lib/dms/asp/"))ConfigFile = ConfigFile & "project/config/ConfigDms.inc.asp"%><HTML><HEAD></HEAD><BODY><%=ConfigFile%></BODY></HTML>\[/code\]Which works when accessed as a stand-alone page, or when called via an iFrame (don't ask). However, if I add the line "include ConfigFile" the page returns a 404 error in IIS. The value of ConfigFile is "/cms/project/config/ConfigDms.inc.asp", as printed out in the body of the page.If I add the line "include https://xxx.xxx.xxx.xxx/cms/project/config/ConfigDms.inc.asp" to replace the original include statement, it works as intended.Now I'm sure that this is a configuration error, but either though I put the ASP setting "enableParentPaths" to true and scrip "errorsenttobrowser" to true, I'm still not getting anywhere.I have identical code on another server running an older version of IIS and it is working fine, however, I never setup the original server and have no documentation for setting up the new server.The ASP script which causes the 404 error looks like:\[code\]<!-- #include file="include.asp" --><%Dim ConfigFileConfigFile = Left(Request.ServerVariables("URL"), InStr(Request.ServerVariables("URL"),"/framework/lib/dms/asp/"))ConfigFile = ConfigFile & "project/config/ConfigDms.inc.asp"include ConfigFile%><HTML><HEAD></HEAD><BODY><%=ConfigFile%></BODY></HTML>\[/code\]But this file works fine:\[code\]<!-- #include file="include.asp" --><%Dim ConfigFileConfigFile = Left(Request.ServerVariables("URL"), InStr(Request.ServerVariables("URL"),"/framework/lib/dms/asp/"))ConfigFile = ConfigFile & "project/config/ConfigDms.inc.asp"include "https://xxx.xxx.xxx.xxx/cms/project/config/ConfigDms.inc.asp"%><HTML><HEAD></HEAD><BODY><%=ConfigFile%></BODY></HTML>\[/code\]Regards
 
Back
Top