在web.config中读取环境变量 [英] Read environment variables in web.config
问题描述
有没有在web.config文件中使用preprocessed功能的方法写code。说我喜欢创建%TEMP%,%WINDIR%环境变量。为了读取这些我可以使用ConfigurationManager中类。但我不想使用它。我woudl喜欢用类似于timeStampPattern ={时间戳(本地)}一个preprocessed功能。这里的时间戳(本地)直接检索值。因此,以类似的方式可以用preprocessed功能如果存在我读环境变量%TEMP%和%WINDIR%?
Is there a way write code in web.config file using preprocessed function. Say I created environment variables like %Temp%, %WINDIR%. order to read these I can use the configurationManager class. But I dont want to use it. I woudl like to use a preprocessed function similar to timeStampPattern="{timestamp(local)}". Here timestamp(local) retrieves the value directly. So in a similar way can i read the environment variables %temp% and %windir% using preprocessed function if any exists?
推荐答案
没有。有没有办法做到这一点。
No. There's no way to do this.
这篇关于在web.config中读取环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!