user3490437
user3490437

Reputation: 1

Configuring IIS to read specific web.config file

I have an IIS server with a website and a virtual directory that is mapped to a share on another server (which also runs IIS). I do not want my primary IIS server to read the web.config files that are in the virtual directories on the other server. Is there a way of making my IIS server only read the web.config file for the site that is presented locally?

Upvotes: 0

Views: 935

Answers (2)

frezq
frezq

Reputation: 702

In the applicationHost.config file you can add the allowSubDirConfig="false" attribute to the <virtualDirectory> element

Upvotes: 0

Omar Himada
Omar Himada

Reputation: 2588

There should only be one web.config per solution parent directory. If there is, that is the one that will be used by the application.

Upvotes: 1

Related Questions