.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 16th, 2002, 10:31 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
Accessing and editing the web.config file

<i><b>Originally posted by : Kerry (whelan_kerry@hotmail.com)</b></i><br />Hi,<br />I am trying to edit different sections of the web.config file. I can gain <br />access to configSections that I have defined using <br />ConfigurationSettings.GetConfig(People/owner) in my code when the <br />web.config file is as follows:-<br /><br />...<br /><configSections><br /> <sectionGroup name="People"><br /> <section name="owner" <br />type="System.Configuration.SingleTagSectionHandler, System, <br />Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" <br />allowLocation="false" /> <br /> <section name="seller" <br />type="System.Configuration.SingleTagSectionHandler, System, <br />Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" <br />allowLocation="false" /><br /> </sectionGroup><br /></configSections><br /> <br /><!-- Custom application settings. --><br /> <People><br /> <owner name="Joe" age="30"/><br /> <seller name="Jack" age="20"/><br /> </People><br /><br />What is the best way to go about changing Joe's name through my C# web <br />application?<br /><br />Also I am having difficulties in accessing any of the sections within the <br />system.web section. How can I access and edit a value for example:- <br /><sessionState Cookieless="false"><br />I have tried using bool nocookies = Session.Cookieless but I am looking for <br />a generic method like ConfigurationSettings.GetConfig(section/value).<br /><br />Any help would be greatly appreciated.<br /><br />Kerry<br /><br />

Reply With Quote
  #2  
Old May 19th, 2002, 10:20 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : steve (steve@aspfree)</b></i><br />trying to secure certain parts of a .config to certain people wouldn't be a good idea. You could have a separate process that writes the certain information to each person and an automated script to generate the web.config file based on the information a person entered. Just bouncing some ideas around but having certain people who have rights to various parts of one web.config file is something that could risk things. just my 2 cents. <br /><br />------------<br />Kerry at 5/16/2002 8:31:31 AM<br /><br />Hi,<br />I am trying to edit different sections of the web.config file. I can gain <br />access to configSections that I have defined using <br />ConfigurationSettings.GetConfig(People/owner) in my code when the <br />web.config file is as follows:-<br /><br />...<br /><configSections><br /> <sectionGroup name="People"><br /> <section name="owner" <br />type="System.Configuration.SingleTagSectionHandler, System, <br />Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" <br />allowLocation="false" /> <br /> <section name="seller" <br />type="System.Configuration.SingleTagSectionHandler, System, <br />Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" <br />allowLocation="false" /><br /> </sectionGroup><br /></configSections><br /> <br /><!-- Custom application settings. --><br /> <People><br /> <owner name="Joe" age="30"/><br /> <seller name="Jack" age="20"/><br /> </People><br /><br />What is the best way to go about changing Joe's name through my C# web <br />application?<br /><br />Also I am having difficulties in accessing any of the sections within the <br />system.web section. How can I access and edit a value for example:- <br /><sessionState Cookieless="false"><br />I have tried using bool nocookies = Session.Cookieless but I am looking for <br />a generic method like ConfigurationSettings.GetConfig(section/value).<br /><br />Any help would be greatly appreciated.<br /><br />Kerry<br /><br />

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Accessing and editing the web.config file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT