IIS Config file in virtual directory

孤人 提交于 2019-12-06 10:20:43

Maybe using the machine.config file on your web server would be a suitable alternative? Otherwise you could create a web.config file in a global folder somewhere and open it using the WebConfigurationManager.OpenMappedWebConfiguration() method.

It's not possible to use a virtual directory (or even files outside of the current website; only the current folder, or a sub-folder).

One possible way to share setting across projects would be to do it at build-time - either by coping it in, or using a Linked File in VS to have it copied to the folder on publish.

If you really need this functionality on the server, you could try (though I can't say how well it would work) a Junction.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!