HowTo have list of keys for RegistryPermissionAttribute

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to define permission attributes for several keys in the Registry
at the assembly level. The documentation for the Read, Write, and Create
properties states that these property values are "A list of Keys and Values
with paths for [read | write | create] access". The only syntax that builds
is
[assembly:RegistryPermissionAttribute(SecurityAction.RequestMinimum,
Read="HKEY_LOCAL_MACHINE\\System\\CurrentControllerSet\\Services\\EventLog,
HKEY_LOCAL_MACHINE\\System\\CurrentControllerSet\\Services\\EventLog\\MyLog")]

Is this the correct method for lists of paths? The web service is
terminating with "Server was unable to process request. --> Request failed."
Now I believe the Windows Server 2003 registry setting are such that I don't
have permissions for reading these keys, so is the Attribute correctly
working or is the list bad.
 
Hi Jim,

welcome to MSDN newsgroup.
Regarding on your question on specifying Multiple registry paths in the
assembly:RegistryPermissionAttribute, based on my research, the
"RegistryPermissionAttribute" 's Read or Write .. .property is designed
for single path entry only. So currently we can not use any separator char
to specify multiple registry paths in the attribute. If want to
declaratively define multiple registry permission assertion in assembly
info file, we have to use multipile
RegistryPermissionAttributes (each contains a certain registry path ...) .

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: HowTo have list of keys for RegistryPermissionAttribute
| thread-index: AcW/vyrMJBLEgcg9TBiaxKRNRW4n+w==
| X-WBNR-Posting-Host: 155.148.26.103
| From: "=?Utf-8?B?SmltTQ==?=" <[email protected]>
| Subject: HowTo have list of keys for RegistryPermissionAttribute
| Date: Thu, 22 Sep 2005 14:47:02 -0700
| Lines: 19
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework:33240
| X-Tomcat-NG: microsoft.public.dotnet.framework
|
| I am trying to define permission attributes for several keys in the
Registry
| at the assembly level. The documentation for the Read, Write, and Create
| properties states that these property values are "A list of Keys and
Values
| with paths for [read | write | create] access". The only syntax that
builds
| is
| [assembly:RegistryPermissionAttribute(SecurityAction.RequestMinimum,
|
Read="HKEY_LOCAL_MACHINE\\System\\CurrentControllerSet\\Services\\EventLog,
|
HKEY_LOCAL_MACHINE\\System\\CurrentControllerSet\\Services\\EventLog\\MyLog"
)]
|
| Is this the correct method for lists of paths? The web service is
| terminating with "Server was unable to process request. --> Request
failed."
| Now I believe the Windows Server 2003 registry setting are such that I
don't
| have permissions for reading these keys, so is the Attribute correctly
| working or is the list bad.
|
| --
| Thanks,
|
| Jim
|
 
Back
Top