Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - Change Web.config value programatically

 
Thread Tools Search this Thread
Old 12-29-2003, 12:10 PM   #1
Default Change Web.config value programatically


How can I change the value of "timeout" in Web.config

<sessionState timeout="20" />

in one deployed app (project A) from a method call in a
WebForm (C#) that's running in another deployed app
(project B) on the same server.


mg
  Reply With Quote
Old 12-29-2003, 05:00 PM   #2
Natty Gur
 
Posts: n/a
Default Re: Change Web.config value programatically
Hi,

Web.config is XML file so if you got rights you can use XMLDocument to
open the fie and edit it. B U T, keep in mind that changing web.config
file cause your application to recycle.


Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Natty Gur
  Reply With Quote
Old 12-30-2003, 04:14 PM   #3
Nick
 
Posts: n/a
Default Re: Change Web.config value programatically
This is really not recommended because as soon as you save the web.config to
the disk your whole application will recyle it self. You may want to create
a custom object and then use XmlSerialization to serialize the object to the
disk so that you can pull the object in at the start and write to it as
nessisary. This will not recyle you application, you also have total
control over this method.


"mg" <> wrote in message
news:052c01c3ce04$bebcef70$...
> How can I change the value of "timeout" in Web.config
>
> <sessionState timeout="20" />
>
> in one deployed app (project A) from a method call in a
> WebForm (C#) that's running in another deployed app
> (project B) on the same server.





Nick
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config edits cause errors war_manelli General Help Related Topics 0 09-26-2007 07:20 PM
Why We Resist Change @ The TechZone Silverstrand Front Page News 0 09-07-2006 12:01 PM
Dune Extended Edition - where is the layer change? John DVD Video 0 02-16-2006 09:43 PM
If I could change the LotR movies... Opticreep DVD Video 33 03-03-2004 12:36 PM
Can't Change IRQs in Windows 2000 Alicia White A+ Certification 8 09-01-2003 08:54 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46