Skip to main content
Inspiring
May 9, 2007
Question

Need help with .asp Virtual Includes

  • May 9, 2007
  • 3 replies
  • 1206 views
Hi,

I am using;

Dreamweaver 8
Win XP Pro
IIS6

Virtual Directory Information in IIS:
Local Path: C:\Inetpub\wwwroot\hseih
Application Name: hseih
Execute Permissions: Scripts Only
Configurations>Options>Enable Parent Paths: Checked
Read, Write, Browsing, Script Secure access, log visits, index this source: All Checked

Dreamweaver Site Setup Information:
Local Root: C:\Inetpub\wwwroot\hseih\
Links Relative to: Site Root
Server Model: ASP/VBScript
Access: Local/Nework
Testing Server Folder: C:\Inetpub\wwwroot\hseih\
URL Prefix: http://localhost/hseih/


Heres the code Im using in my index.asp file, where the footer.asp file is in the same directory.

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

very simple, I believe I have everything setup correctly, and it should work. But I receive:

Error Type:
Active Server Pages, ASP 0126 (0x80004005)
The include file 'header.asp' was not found.
/hseih/index.asp, line 10

However, it DOES work whenI add the root directory name into the include path as follows:

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

its like there's a setup issue somewhere, where IIS is misinterpreting the root of my site. When Im specifying to use the Site Root, and also the use of the "/" in the include path - doesnt that specify the root directory?

Any insight would be greatly appreciate.

Thanks!
This topic has been closed for replies.

3 replies

Inspiring
May 9, 2007
updated next
Inspiring
May 9, 2007
Also, the root of your site is http://localhost/, "hseih" is a subdirectory
to it, even though you have it set up in your site definition as the URL
prefix. If you need the "hseih" directory to be the root of your site,
you'll need to open IIS Manager and set the Local Path parameter under the
Home Directory tab to this directory. The http://localhost/ will represent
the content in that directory. Currently, the root directory is
"C:\Inetpub\wwwroot", so any subdirectory to this point will appear in your
browsers address path.

Best regards,
Chris

"fmeenz" <webforumsuser@macromedia.com> wrote in message
news:f1t6vj$ocg$1@forums.macromedia.com...
> Hi,
>
> I am using;
>
> Dreamweaver 8
> Win XP Pro
> IIS6
>
> Virtual Directory Information in IIS:
> Local Path: C:\Inetpub\wwwroot\hseih
> Application Name: hseih
> Execute Permissions: Scripts Only
> Configurations>Options>Enable Parent Paths: Checked
> Read, Write, Browsing, Script Secure access, log visits, index this
> source:
> All Checked
>
> Dreamweaver Site Setup Information:
> Local Root: C:\Inetpub\wwwroot\hseih\
> Links Relative to: Site Root
> Server Model: ASP/VBScript
> Access: Local/Nework
> Testing Server Folder: C:\Inetpub\wwwroot\hseih\
> URL Prefix: http://localhost/hseih/


Inspiring
May 9, 2007
chris -

just reading your 2nd post about making the IIS root directory 'hseih'

currently, my IIS local path for my virtual directory is set to

Local Root: C:\Inetpub\wwwroot\hseih\

is that not correct?

when i browse http://localhost/hseih/ i do in fact see my index.asp page. Its the include files that arent working correctly. I am under the assumption that, by adding a "/" to any reference -- link, image, include -- it should first start from the root of the site and pull from there. From what I understand, I have set the root of my site to the hseih directory. please correct me if im wrong.

thanks
eric
Inspiring
May 9, 2007
If you're using a relative path, use:

<!--#include file="../relative/path/to/file.asp"-->

If you're using an absolute path from the root of the site, use:

<!--#include virtual="/absolute/path/from/root/to/file.asp"-->

Make sense?

Best regards,
Chris

"fmeenz" <webforumsuser@macromedia.com> wrote in message
news:f1t6vj$ocg$1@forums.macromedia.com...
> Hi,
>
> I am using;
>
> Dreamweaver 8
> Win XP Pro
> IIS6
>
> Virtual Directory Information in IIS:
> Local Path: C:\Inetpub\wwwroot\hseih
> Application Name: hseih
> Execute Permissions: Scripts Only
> Configurations>Options>Enable Parent Paths: Checked
> Read, Write, Browsing, Script Secure access, log visits, index this
> source:
> All Checked
>
> Dreamweaver Site Setup Information:
> Local Root: C:\Inetpub\wwwroot\hseih\
> Links Relative to: Site Root
> Server Model: ASP/VBScript
> Access: Local/Nework
> Testing Server Folder: C:\Inetpub\wwwroot\hseih\
> URL Prefix: http://localhost/hseih/
>
>
> Heres the code Im using in my index.asp file, where the footer.asp file is
> in
> the same directory.
>
> <!--#include virtual="/header.asp"--> or
> <!--#include virtual="header.asp"-->
>
> very simple, I believe I have everything setup correctly, and it should
> work.
> But I receive:
>
> Error Type:
> Active Server Pages, ASP 0126 (0x80004005)
> The include file 'header.asp' was not found.
> /hseih/index.asp, line 10
>
> However, it DOES work whenI add the root directory name into the include
> path
> as follows:
>
> <!--#include virtual="/hseih/header.asp"-->
>
> its like there's a setup issue somewhere, where IIS is misinterpreting the
> root of my site. When Im specifying to use the Site Root, and also the
> use of
> the "/" in the include path - doesnt that specify the root directory?
>
> Any insight would be greatly appreciate.
>
> Thanks!
>