Home All Groups Group Topic Archive Search About

I would like to use DTD entity in web.config

Author
28 Mar 2007 1:09 AM
ksen
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

AddThis Social Bookmark Button