Reputation: 15031
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?
Upvotes: 3
Views: 3433
Reputation: 51
It can be done.
That is all you need to do: value="${envVarKey}
where envVarKey any environment variable.
Upvotes: 2
Reputation: 8336
Are you looking for Environment.getenvironmentvariable()? You will need to find and replace them yourself.
Upvotes: 2