Saturday, March 24, 2012

Web.Config size

Hi,

I am creating a web application which contains a Header (user control). The
header contains some labels which displayes infomation specific to page like
whats this, some page caption etc.
I wish to add some dynamism to this so that page specific label texts can
be modified without recompilation. i think using a XML file will do , but
that too with overhead of opening and closing the file on every page (any
better options so that file can be read once and used till any changes to
file.)
secondly i thought to use web.cofig (may be by making a separate
configuration section), that would work fine so long as it is 5,10 or 20
pages, what if there are 50 or more aspx page, will that effect peformance?
if not will the size of configuration file matter if it grows e.g. 1MB.
Using a DB can also solve my purpose, but i dont want that.

ThanksHi Tarun:

You can read the XML file into the cache as a single entry (or perhaps
multiple entries, depending on what you have), and then use the
CacheDependency class from System.Web.Caching to monitor the file for
changes. When the file changes, the dependency will kick out the cache
entries.

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 8 Nov 2004 19:42:01 -0800, Tarun Upadhyaya
<TarunUpadhyaya@.discussions.microsoft.com> wrote:

>Hi,
>I am creating a web application which contains a Header (user control). The
>header contains some labels which displayes infomation specific to page like
>whats this, some page caption etc.
>I wish to add some dynamism to this so that page specific label texts can
>be modified without recompilation. i think using a XML file will do , but
>that too with overhead of opening and closing the file on every page (any
>better options so that file can be read once and used till any changes to
>file.)
>secondly i thought to use web.cofig (may be by making a separate
>configuration section), that would work fine so long as it is 5,10 or 20
>pages, what if there are 50 or more aspx page, will that effect peformance?
>if not will the size of configuration file matter if it grows e.g. 1MB.
>Using a DB can also solve my purpose, but i dont want that.
>Thanks
test
Tarun Upadhyaya <TarunUpadhyaya@.discussions.microsoft.com> wrote in message news:<A5AF02DE-F625-44C6-8D92-A192F4D0D882@.microsoft.com>...
> Hi,
> I am creating a web application which contains a Header (user control). The
> header contains some labels which displayes infomation specific to page like
> whats this, some page caption etc.
> I wish to add some dynamism to this so that page specific label texts can
> be modified without recompilation. i think using a XML file will do , but
> that too with overhead of opening and closing the file on every page (any
> better options so that file can be read once and used till any changes to
> file.)
> secondly i thought to use web.cofig (may be by making a separate
> configuration section), that would work fine so long as it is 5,10 or 20
> pages, what if there are 50 or more aspx page, will that effect peformance?
> if not will the size of configuration file matter if it grows e.g. 1MB.
> Using a DB can also solve my purpose, but i dont want that.
> Thanks

0 comments:

Post a Comment