Re: Saving config file - System.UnauthorizedAccessException
- From: "SvenC" <SvenC@xxxxxxxxxxxxxxxx>
- Date: Fri, 15 Sep 2006 18:00:46 +0200
Hi,
"David++" <David@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E00B8050-0C05-42BE-943A-1391FD0797CF@xxxxxxxxxxxxxxxx
Hello,
I think the reason I was having this problem was due to the configuration
file (which contains appSettings) is read-only. However, as the client
didnt
want user settings written to a local computer and wanted just an exe and
one
local config file I had to manually create a new config file for any
changes
to the application settings and then refresh the settings internally by
re-loading these settings using ConfigurationManager. Strange I am able to
overwrite the exisiting config file with a new one, but not able to edit
and
save changes to it. Still it seemed to work ok, thank god!
I guess the account you used to overwrite the file is different from that
one running your wep app. If impersonation is enabled the web app code is
running with the credentials of the client, so that gives even more options
for a client being able to not update those settings. As long as the
ConfigurationManager class is used it is reading the settings from a cached
in memory version, so the file access has been executed at app start. It has
been a while since I read this, so I do not remember all the details, but
the documentation in MSDN has quite some stuff in there and there is also a
good book from WROX about aspnet 2.0 security.
--
SvenC
Best,
David
.
- References:
- Saving config file - System.UnauthorizedAccessException
- From: David++
- Saving config file - System.UnauthorizedAccessException
- Prev by Date: AzMan, Scopes and Access Check
- Next by Date: Windows Service Created Sub-process?
- Previous by thread: Saving config file - System.UnauthorizedAccessException
- Next by thread: Re: SecurityExcepion inside DLL linked in an HTML tag OBJECT
- Index(es):
Relevant Pages
|