我在 wwwroot(财务)内的子文件夹中有一个应用程序,运行良好,但其他人安装了另一个应用程序,而不是在子文件夹中,而是在 wwwroot 中。 所以 wwwroot 和我的子文件夹中有一个 web.config。 当我运行我的应用程序时,它不再读取我的文件,而是读取根目录中的文件。无论其他应用程序是否安装不正确,我如何配置我的应用程序来读取我的文件而不是根文件? IIS 或我的 web.config 中是否有任何配置?
目前存在:
C:\inetpub\wwwroot\web.config
C:\inetpub\wwwroot\Finance\web.config
我尝试:
<location path="." inheritInChildApplications="false">
.......
</location>
在我的 web.config 的不同部分但不起作用。 我的网络配置:
<configuration>
<appSettings>
.......
</appSettings>
<connectionStrings>
.......
</connectionStrings>
<system.web>
.......
</system.web>
<system.webServer>
.......
</system.webServer>
<system.web.extensions>
.......
</system.web.extensions>
</configuration>
请检查配置是否正确,在根文件夹的 web.config 中用以下元素包裹
<location path="." inheritInChildApplications="false">
<system.web>
</system.web>
</location>
并保留所有其他设置元素不变。