DTD Entity in Web.config

G

Guest

Hi, I would like to use DTD entity in web.config. For example

Here is my DTD
<?xml version="1.0" encoding="us-ascii" ?>
<!ENTITY SessionTimeout "30" >

In the Web.config
Add the following line below the xml declaration
<!DOCTYPE configuration SYSTEM "Environment.dtd">

Then in the appSettings Section i am referencing the entity

<appSettings>
<add key="SessionTimeout" value="&SessionTimeout;"/>
</appSettings>

If i mouse hoover on "&SessionTimeout " it shows the actual value. This also
works fine in XML file without no issues when your open it in IE.

But when i use ConfigurationManager to get the value it is returning the
variable instead of actual value. Do you know how to solve this issue? I
appreciate your help.

Thanks
Sen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top