HELP...component service: access denied to registry key

M

mimi

I created a component service called DataAccess dataaccess.dll. I have 3
web client applications that referenced to the dll. They all work fine on
my local. But moving to the server, we get the error 'access to the
registry key HKey_Class_Root\... is denied.
I've been trying to look up the example on serviced component but there's
not many details on the client side. Does anyone know an example of
creating & using serviced component. I read from microsoft library, but
very simple and doesn't show much on the client? In my web clients, I
referenced a serviced component by browsing to the directory containing the
dataaccess.dll. As the result, that dll is copied into bin folder of each
project. If I need to register the components on the server, then I have to
register 3 of them??? I know it's not the way it's supposed to be.

Thanks in advance
 
S

Scott Allen

My guess is the component has not been explicitly registered, and so
the runtume is dynamically trying to register the component when it's
first used by a web application. Unfortunately, the account used to
run the ASP.NET account does not have enough permissions (you need to
be an admin to write into HKEY_CLASSES_ROOT - everyone else only has
read perms.

You only need to register a serviced component once. If you don't want
the assembly to appear in the bin directory for all the apps, you can
install the assembly into the global assembly cache (GAC), and
right-click in the reference in Project References and set the Copy
Local property to false.

HTH,
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top