views:

166

answers:

1

I have two differents virtual directories mapping to the same directory on the OS. In one of this virtual directories I need to have the browse folders disable, and in the other one I need to have it enable.

The problem is that when I changed one of them the other change as well. I thinks this problem is related that both virtual directories points to the same folder in the OS, but with the IIS6 I had this same configuration with out a problem.

Any idea of a work around with this?

Thanks!

A: 

The reason why it is different behavior from IIS6 is that IIS6 stored the property for allowing directory browsing in the IIS6 Metabase DirBrowseFlags property of the virtual directory, which has a unique entry for each virtual directory, whereas in IIS7, that property is now stored only in the Web.config file:

<system.webServer>
    <!-- ... -->
    <directoryBrowse enabled="true" />
</system.webServer>

Since both your virtual directories in IIS7 share the same physical directory, they both share the same Web.config file, and so you'll find that changing the property in one causes the change to appear in the other, as they're both modifying the same Web.config file.

(I don't of know a good workaround to this for IIS7 for you at the moment.)

Mike Atlas
Thanks Mike for the explanation, I am also still looking but without luck.
You're welcome. Here's some points so you can now upvote answers =)
Mike Atlas