Modify a web.config file

  • Thread starter Thread starter 3471Jack329
  • Start date Start date
3

3471Jack329

This is a stupid question but I risk it.

Just in case something is possible...

How can I modify the web.config settings from ASP.NET programming?

<system.net>
<mailSettings>
<smtp from="(e-mail address removed)">
<network host="link.geogio.com" password="password"
userName="username" />
</smtp>
</mailSettings>
</system.net>
 
You can't, because the file is locked. You can do it outside the web, but,
as mentioned by Eliyahu, it will restart your application, booting off all
live sessions.

In .NET 2.0, you can make additional "config" files that are linked from the
web.config and do it that way. Or, you can create your own configuration
"handler" and do whatever you wish.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 

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

Back
Top