Modify a web.config file

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>
 
E

Eliyahu Goldin

Just note that modifying the web.config will cause your application to
restart.
 
C

Cowboy \(Gregory A. Beamer\)

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

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top