Is this an IIS Virtual Directory issue?

I’m using IIS 5.1 to work on various ASP-driven projects and I’m running into some issues with Virtual Includes… I think it has something to do with how the directories are set up. Keep in mind that I have WAMP installed on this computer, so this means that in order to also use IIS, I had to change the port to 8080. What this means is that whenever I use IIS, I have to type something like “http://localhost:8080/whatever” to get to my local websites that I’m working.

That said, my local directory is broken down as follows:
websites
practice
scripts

The given project I’m working at the moment is within the “websites” directory. In that, there is the actual project directory. Now in THAT directory is an “inc” folder that has your basic menu include files.

They’re not working.

I tried to go into “Internet Information Services” to make this inc directory a virtual directory, but what happened is that IIS made a directory INSIDE the inc directory a virtual directory with the same name and same contents!
:injured:

Back to the main point: why are my virtual includes not working? Any ideas?

What do you mean by “not working”?

Have you reviewed your windows event logs and http logs for any clues? One possibility if you’re using something like …/wherever.asp for a path you may not have parent paths enabled on your server, if that’s the case use the complete url path, not a relative path.

Hey Doug. What I mean is that the includes aren’t working right. Whenever I go to view a page, the virtual inclusions aren’t processing at all (from the looks of it, at least).

How do I enable those paths? I tried to use a complete URL with no results.

You can find the setting for parent paths somewhere in the IIS manager, but I don’t recall where. And that’s only a guess, there are other possible causes of your problem.

Did you check your logs? That’s probably where you’ll find the answer.

Thanks for the heads-up on the logs, Doug. This is what I found:

#Software: Microsoft Internet Information Services 5.1
#Version: 1.0
#Date: 2010-11-22 05:10:40
#Fields: time c-ip cs-method cs-uri-stem sc-status
05:10:40 127.0.0.1 GET /websites/web_18_osp/index.htm 200
05:10:40 127.0.0.1 GET /websites/web_18_osp/print.css 200
05:10:40 127.0.0.1 GET /images/templates/4/container_bg_y.jpg 404
05:10:40 127.0.0.1 GET /websites/web_18_osp/banner.jpg 200
05:10:40 127.0.0.1 GET /websites/web_18_osp/dept_pic5.jpg 200
05:10:40 127.0.0.1 GET /images/templates/4/navbg.jpg 404
05:10:43 127.0.0.1 GET /favicon.ico

The code I’m worrying about in all this is the following:

<div id="navarea">
   <div id="sitenav">
      <!--#include virtual="/osp/inc/navigation.htm"-->
   </div>		
   <div id="audience_paths">
      <!--#include virtual="/inc/audience_paths.htm"-->
   </div>
   <div id="contact">
      <!--#include virtual="/osp/inc/contact.htm"-->
   </div>	
</div>

Any ideas?

I think what you posted is coded OK, but I haven’t used asp in a few years. Maybe there is something else going on. Does IIS have an http error log too? In apache on linux the http error log is a separate log file from the access log, if there’s an IIS error log take a look in it too. Also take a look in your windows event logs.

Is there a chance that this is just due to using such an old version of IIS?