views:

39

answers:

0

I know this is probably easy but I just don't know that much about .NET security so here goes:

I have a VS2008 VB solution that contains 4 projects. Windows Service, Forms Application a Class Library and an install.

The service installs fine and runs under the system account. However, as the service starts I call a method in the library to load parameters from the registry, which raises the following security exception: "Requested registry access is not allowed".

This doesn't happen when I call the same method from the forms application.

Does anyone know why this is happening and how I can configure the security to allow it to access the registry (preferably without installing the assembly into the GAC)?