Can't read remote registry key.

Discussion in 'ASP .Net Security' started by sergey.losyev@gmail.com, May 1, 2006.

  1. Guest

    Hi, it's a small intranet webapp.

    OpenRemoteBaseKey works fine, but on read-only OpenSubKey function I
    get an error:
    <Requested registry access is not allowed.>

    On remote machine I set all Code Groups to Everything, Set all .NET
    security to Full Trust and in Registry added "Everyone" with Full
    Control to the key and I still can't get past the error! Please advise!

    This is my function in webservice:

    public bool Read_Key()
    {

    // Opening the registry key
    RegistryKey rk =
    RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine,"RDATABASE");

    // Open a subKey as read-only
    RegistryKey sk1 = rk.OpenSubKey(SOFTWARE\\TEST\Sample1);

    // If the RegistrySubKey doesn't exist -> (null)
    if ( sk1 == null )
    return false;
    try
    {....



    Sergey
    , May 1, 2006
    #1
    1. Advertising

  2. Guest

    I added <identity impersonate="true" userName="Admin" password="pass"
    /> and it worked!

    But why didn't all my loose permissions (posted above) work for
    whatever default account asp.net uses to access remote registry?
    , May 1, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Slimo

    Read remote registry

    Slimo, Jan 10, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    9,788
  2. HK
    Replies:
    1
    Views:
    3,606
    Cowboy \(Gregory A. Beamer\)
    Apr 1, 2004
  3. =?Utf-8?B?RnJ1c3RyYXRlZCBOZXdiZQ==?=

    ASP.NET app can't read a registry key

    =?Utf-8?B?RnJ1c3RyYXRlZCBOZXdiZQ==?=, Jan 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    640
    =?Utf-8?B?RnJ1c3RyYXRlZCBOZXdiZQ==?=
    Jan 12, 2005
  4. Leny
    Replies:
    3
    Views:
    16,904
    Daniel
    Feb 1, 2005
  5. Replies:
    0
    Views:
    2,474
Loading...

Share This Page