ASP.NET and COM registry access denied

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default ASP.NET and COM registry access denied

    I've seen many posts on the web about this topic, and I still haven't
    found an answer that works for me. I have an ASP.NET page written in
    C# that instantiates a COM object that attempts to access a registry
    key. The object fails, but it is a third party component and all the
    vendor can tell me is to "make sure there are no security restrictions
    on the registry" and they gave me a registry key. I've given the
    aspnet account access to this key by using regedt32. Additionally, my
    web.config file is set to Forms authentication, IIS is set to use
    Anonymous Access, and the <processmodel> username in machine.config is
    set to "machine". I can get it to work by setting the username in the
    machine.config file to "system", but I've been told that doing so
    opens a major security hole. This is a public web application so using
    a Windows account is not an option. Does anyone have any ideas on how
    I can get this working?

    Thanks. I appreciate the help.
    Bill Guest

  2. Similar Questions and Discussions

    1. Web Service + Anon Access, but getting 401 Access Denied Error
      I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous...
    2. Network Registry Access
      Hi, I am having trouble getting NTsyslog to work on Win 2000 server. The error mesage in the event viewer is - The description for Event ID ( 0 )...
    3. w2k/iis5.0/com/registry access
      Thanks for info but I want to keep permissions limited. My issue was related to the registry key being under HKEY_CURRENT_USER. I can't change...
    4. Access denied when creating Access application object
      In an ASP file I am running the following in VBScript in order to extract data from an Access 2002 MDB file which is physically located in the...
    5. access to system registry denied
      Hi, I have a problem with the method "EventLog.CreateEventSource" because I received one error message (access to system registry denied). I...
  3. #2

    Default RE: ASP.NET and COM registry access denied

    If you are using a COM component, you can set a specific user account as its identity. You can then give this user access to the registry key. To set the identity you can either do it programmatically in your code, but since it is a third party component you can set the identity in the Component Services snap-in in the MMC. Just right click the component's package and choose the identity tab to get there.

    hope this helps,
    John

    "Bill" wrote:
    > I've seen many posts on the web about this topic, and I still haven't
    > found an answer that works for me. I have an ASP.NET page written in
    > C# that instantiates a COM object that attempts to access a registry
    > key. The object fails, but it is a third party component and all the
    > vendor can tell me is to "make sure there are no security restrictions
    > on the registry" and they gave me a registry key. I've given the
    > aspnet account access to this key by using regedt32. Additionally, my
    > web.config file is set to Forms authentication, IIS is set to use
    > Anonymous Access, and the <processmodel> username in machine.config is
    > set to "machine". I can get it to work by setting the username in the
    > machine.config file to "system", but I've been told that doing so
    > opens a major security hole. This is a public web application so using
    > a Windows account is not an option. Does anyone have any ideas on how
    > I can get this working?
    >
    > Thanks. I appreciate the help.
    >
    John Sivilla Guest

  4. #3

    Default RE: ASP.NET and COM registry access denied

    Thanks for your quick response.

    I looked in Component Services, but the third party tool isn't there.
    It's possible that it isn't a COM object, and it is only a regular dll
    assembly. In this case, is there a similar way of doing this?



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bill Shipman Guest

  5. #4

    Default RE: ASP.NET and COM registry access denied

    Hi Bill,

    In that case, if you are calling the component from an asp.net application is it running with whatever identity the asp.net application is running. If you say that user has access to the registry key, and it is still not working, then there is some kind of access denied error occuring somewhere on your system, which may or may not be related to the registry key.

    When I get these kinds of problems, I use a utility that has saved me countless hours or debug time. It is called Filemon and it lists all accesses in real time. If there is a access denied error it will log it for you with all the info you need to correct the problem. The best thing about it is that it is free. Go to [url]http://www.sysinternals.com[/url] and search for the latest version of Filemon, install it, and run it and try to find out where exactly the access problem occurrs.

    hope this will help you,
    John


    "Bill Shipman" wrote:
    > Thanks for your quick response.
    >
    > I looked in Component Services, but the third party tool isn't there.
    > It's possible that it isn't a COM object, and it is only a regular dll
    > assembly. In this case, is there a similar way of doing this?
    >
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!
    >
    John Sivilla Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139