Web Config File Editing in ASP.Net 2.0

S

Stuart Ferguson

I am attempting to put a screen in a web application that allows editing
of AppSettings values in the Web.Config file using the Web Configuration
manager class however on he .Save i get an access denied exception.

What could be causing this exception and what should i be looking at to
fix the problem.

Many Thanks

Stuart
 
K

Kevin Spencer

In the .Net Framework 1.1 ( you *are* using the .Net Framework 1.1?), you
cannot edit configuration files programmatically. The good news is, in the
..Net Framework 2.0, you can, within certain limits.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Complex things are made up of
Lots of simple things.
 
S

Scott Allen

Look at the web.config file using file explorer and double check the
permission settings. Compare the write access to the account running
ASP.NET (typically your account (if you are using a file based project
in 2005) or the NETWORK SERVICE account (when using IIS 6).
 
C

clintonG

I haven't been able to find a page from Microsoft with a link to this most
important document [1] but it discusses changes to write permissions for XML
files as well as other changes implemented by the 2.0 RTM.

For now, I think it best to use this DevX page [2] as a reference which we
can save as a Favorite and easily find and share with others until such time
somebody finds a page from Microsoft with a link rather than a direct
download.

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/

[1]
http://download.microsoft.com/downl...6d3cd6ad7c1/Breaking Changes Beta2 to RTM.doc

[2] http://www.theserverside.net/news/thread.tss?thread_id=37383
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top