Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > ASP.NET and COM registry access denied

Reply
Thread Tools

ASP.NET and COM registry access denied

 
 
Bill
Guest
Posts: n/a
 
      07-13-2004
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.
 
Reply With Quote
 
 
 
 
John Sivilla
Guest
Posts: n/a
 
      07-14-2004
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.
>

 
Reply With Quote
 
 
 
 
Bill Shipman
Guest
Posts: n/a
 
      07-14-2004
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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
John Sivilla
Guest
Posts: n/a
 
      07-15-2004
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 http://www.sysinternals.com 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 http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Access to the registry key HKEY_CLASSES_ROOT\EntSrvcTest1_direct.Global is denied z f ASP .Net Security 3 09-15-2005 01:17 PM
"Access to the registry key is denied" and OpenRemoteBaseKey Jenna ASP .Net 2 07-27-2004 02:46 AM
Reading registry key throws "Requested registry access is not allowed." HK ASP .Net 1 04-01-2004 04:44 PM
access to system registry denied Andrea Mondello ASP .Net 1 07-01-2003 03:03 PM



Advertisments
 



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