how to set security rights in order to write to the registry?
From: Egmont Gabler (info@gabler-systemtechnik.de)
Date: 12/17/02
- Next message: Larry Hastings: "Re: how to set security rights in order to write to the registry?"
- Previous message: Leon: "Generating an X509Certificate"
- Next in thread: Larry Hastings: "Re: how to set security rights in order to write to the registry?"
- Reply: Larry Hastings: "Re: how to set security rights in order to write to the registry?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Egmont Gabler" <info@gabler-systemtechnik.de> Date: Tue, 17 Dec 2002 18:09:44 +0100
Within my ASP.NET web app I want to write to the registry. After trying to
open a registry key using
RegistryKey key =
Registry.LocalMachine.OpenSubKey("Software\\MyCompany\\MySoftware", true);
within my aspx.cs file I get the error message:
System.Security.SecurityException: Requested registry access is not allowed.
I already set the following configuration settings:
1) change the username within machine.config to "system" (<processModel ...
userName="system" ...>)
2) Set the following entry within web.config of the web project:
<system.web>
<identity impersonate="true" />
...
3) Run "mscorcfg.msc"->Runtime Security Police->Adjust Zone Security and set
all zones to full trust
4) Run "mscorcfg.msc"->Increase assembly trust and add full trust for all my
project assemblies
5) Let the ASPNET (aspnet_wp) user account be a member of the administrators
group
6) Set the IE security options for all zones to the lowest possible value
and add my local web site to the trusted sites of my local intranet.
As one can see I REALLY would like to write to the registry but I always get
the same error message. (Of course I can read from the registry when
suppressing the "true" flag in the function call.) Is there any
configuration stuff I should try too? Any hints are very welcome!
Egmont
- Next message: Larry Hastings: "Re: how to set security rights in order to write to the registry?"
- Previous message: Leon: "Generating an X509Certificate"
- Next in thread: Larry Hastings: "Re: how to set security rights in order to write to the registry?"
- Reply: Larry Hastings: "Re: how to set security rights in order to write to the registry?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|