Link to home
Start Free TrialLog in
Avatar of J-DRouse
J-DRouse

asked on

Include File Workd, Include Virtual does not

The following code works on my hosting server but fails on the localhost 5.1 under IIS 5.1 while testing using Dreamweaver.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include virtual="/Connections/cnBoard.asp" -->

The following code works on my localhost IIS 5.1 using the same Dreamweaver web site.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/cnBoard.asp" -->

Is the problem with my IIS setup or in Dreamweaver Site Manager
ASKER CERTIFIED SOLUTION
Avatar of amit_g
amit_g
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of J-DRouse
J-DRouse

ASKER

Thanks for the tips.  I created a Connections folder under the Inetpub/wwwroot and placed a copy of all my ODBC connections.  Every page that has a <--#include virtual="/Connection/xxxx.asp"-->  statement works.

What I don't understand is how then does the same statement work on the host web site since I place the Connections folder under the web site's name.  Does the Web Hosting IIS software treat the root directory differently that the Inetpub/wwwroot?

Also, I would assume a lot of web developers would experience this same thing.  Therefore, I would think the solution would have been under the Microsoft's and Macromedia's FAQ section.  I searched for days trying to find this solution.
Web hosting probably made your website as root so it all worked. On your local system you must have made a virtual folder as you might have more applications. That is why it did not work. If you want you can also create a new website on your own machine and then it would work there too.