473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Web Config File Editing in ASP.Net 2.0

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

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
4 1695
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.

"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2
I believe Stuart is using 2.0.

Have you taken a look at what the Configuration Application Block offers?
http://msdn.microsoft.com/library/de...tml/config.asp

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uT**************@TK2MSFTNGP12.phx.gbl...
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.

"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***


Nov 19 '05 #3
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).
--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sat, 12 Nov 2005 03:26:13 -0800, Stuart Ferguson
<st**************@btinternet.com> wrote:
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

*** Sent via Developersdex http://www.developersdex.com ***


Nov 19 '05 #4
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/downlo...20to%20RTM.doc

[2] http://www.theserverside.net/news/th...hread_id=37383
"Stuart Ferguson" <st**************@btinternet.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl...
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

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: blekros | last post by:
All, I have a web service client written in VB.NET. It is a class library assembly (.dll file). I made a web reference to a web service and set it to be dynamic, so it puts the URL of the...
2
by: hazz | last post by:
With this code, the config file(listed below) opens initially into the datagrid display with only a plus sign '+'. On clicking that, it becomes expanded to; - appsettings add When I click on...
4
by: aSoundMind | last post by:
Hi there, I recieve this error Server Error in '/integrate' Application. -------------------------------------------------------------------------------- Configuration Error Description: An...
13
by: Jonny Bergdahl | last post by:
I have a ASP.Net 2.0 web application that I am trying to debug. Problem is that I can't get the error message to show in the browser. It always returns the generic error message telling me to set...
3
by: Blasting Cap | last post by:
I am working on a web app that I want to be able to use a separate config file on, in addition to the web.config file that's already working in the application. If I put the following in the...
12
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
5
by: =?Utf-8?B?bWNxd2VydHk=?= | last post by:
Hello, I'm trying to enable an error handling package at the root of my web server by editing this file: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CONFIG\web.config In the httpHandlers...
21
by: Nick Craig-Wood | last post by:
Lance Gamet <lance@gamet.comwrote: I've found http://docs.python.org/lib/module-ConfigParser.html To be easy to use and built in. It makes human readable / editable ..ini - like files. ...
10
by: =?Utf-8?B?TUNN?= | last post by:
When creating a new VB Web Application Project with VS2008, there are several settings (compiler settings, option strict, etc) that appear both in the web.config file and "My Project". I'm...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.