Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Need help with .asp Virtual Includes

Explorer ,
May 09, 2007 May 09, 2007
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!
TOPICS
Server side applications
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 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!
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 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/


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 09, 2007 May 09, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
LATEST
You web server configuration is what ultimately drives how your site is set
up and how you navigate to all of your resources, whether they be include
files, images, or what have you.

Right now, the *root* of your web site, according to your IIS configuration,
is c:\inetpub\wwwroot. This translates into http://localhost/. If you have
your "hseih" folder within wwwroot, then it's a virtual directory, or
subfolder, of the root. In other words, http://localhost/hseih/. So if you
had a file in the "hseih" directory called "myfile.asp", then the path to it
would be: http://localhost/hseih/myfile.asp.

If, on the other hand, you reconfigure the web site in IIS to use
c:\inetpub\wwwroot\hseih as the root of your web site as described in the
configuration information I referred to earlier, the path to that same file
would be http://localhost/myfile.asp. It's all a matter of telling IIS
where the start of your web site is.

The Local Root Folder config in the Local Info section of your site
definition tells Dreamweaver where the files reside that you'll be editing.
*Typically*, this lines up with the HTTP Address config in the Local Info
section of your site definition. Not always, but most of the time.
*Typically*, this also lines up with the URL Prefix in the Testing Server
section of your site definition. Because you've got http://localhost/hseih/
set up in the URL prefix *and* "c:\inetpub\wwwroot\hseih" set up in the
local root folder everything is resolving correctly, because technically
they're the same location. But, the thing to remember is "hseih" is a
virtual directory within the site, it's not the root of the site (which is
one level up from there).

Any configuration URL that you set in your Dreamweaver site definition is
pretty much there to tell Dreamweaver where to find things when it creates
your preview pages, and other similar tasks. It's mostly there to make sure
it builds links and references correctly for those functions. Once you have
a grasp on those two items and know where the separate of web server and
design tools occur, it makes a lot more sense.

When you're working locally, which it sounds like you are, things are
generally easier to configure because the local and remote info are the
same. But when you begin working with outside web servers, it can get more
complicated.

Best regards,
Chris

"fmeenz" <webforumsuser@macromedia.com> wrote in message
news:f1tbdd$3a$1@forums.macromedia.com...
> 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
>
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 09, 2007 May 09, 2007
updated next
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines