Tomcatf14
08-03-2005, 04:34 PM
MS has disabled Parent directory browsing by default in IIS which means users cannot use "../" to indicate parent directory or going upper directory. Any solution on this problem beside enabling Parent Directory Browsing?
I'm using ServerMapPath and include function.
DatabaseMart
08-04-2005, 09:56 AM
There is no better way to deal with it. Here are the work-around.
1) For ASP code, you can define a global variable (Const strDefaultPath = "/MyDefaultFolder"). So you can use strDefaultPath & "/SubFolder1" instead of "../SubFolder1". When you move the site to another folder or server, you only need change this variable. You can also put this variable in the configuration file (web.config) if you like.
2) For #Include directive, there is no other way (#inlcude directive cannot use variable). You always need to use absolute path ("/MyDefaultFolder/Include/...").
Please share your ideas if you find a better one.
Tomcatf14
08-07-2005, 07:41 PM
Thanks for the help. Any other options available?
thewebhostingdir
08-08-2005, 03:49 AM
HI,
Do you have direct access to your IIS Server?
You can always enable this option by login to IIS > Your Website > Properties.
You will find multiple tabs there. In a particular tab you can enable the parent directory browsing for your website.
If you don't have direct access to your website, you can request your web hosting company to perform this task.
Tomcatf14
08-09-2005, 03:36 AM
I have access to the server. As this is a shared hosting server, enabling the Parent Path would invite security problem on the server. This is the main reason MS disabled this option by default on IIS6.
thewebhostingdir
08-09-2005, 12:03 PM
Hi Tomactf14,
I think that you can enable this option on domain by domain basis.
Did you tried that enabling for your domain name?
Tomcatf14
08-09-2005, 10:28 PM
The function could work once i enable the Parent Path. The only thing that i am concern would be the security. From what i know, this would expose the server to breakin. Any programmer could verify this?