1

I'm doing a migration of a web server running on IIS 5 to IIS 7. I'm noticing that the virtual directories are behaving differently between the two.

I have a site located at c:\inetpub\SiteName. This site contains a virtual directory "bob" that points at c:\virtualdirs\bob. There's a script in the bob folder (script.asp) that contains just:

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

I'm noticing different behaviors between IIS5 and IIS7 when I attempt to run the script by going to http://SiteName/bob/script.asp:

IIS5 references the parent path of the site, and imports c:\inetpub\SiteName\index.asp. IIS7 references the parent folder of the virtual directory, and looks for a c:\virtualdirs\index.asp (that doesn't exist). Doing a Response.Write of a Server.MapPath confirms this.

Is there a way to get IIS7 to behave like IIS5 in this regard? Unfortunately, moving index.asp and its logic into the virtualdirs folder isn't an option as the virtual directory will be shared across many sites (with differing index.asps).

Thanks.

1 Answer 1

0

Answered on other forum: http://forums.iis.net/p/1168652/1946977.aspx

Pretty much confirms that the functionality changed between IIS versions. The only way to correct it is to modify any references to the code from ".." to "/" (site root) with respect to virtual directories.

Obviously not the optimal solution but it will have to do for now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .