RijndaelManaged class

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I run my application as a NonAdmin user(a user who is a part of the
"Users" group), it throws an exception at a point in the code where
RijndaelManaged class is instantiated. Exception thrown is "Requested
registry access is not allowed". Any help wld be highly appreciated.
 
When I run my application as a NonAdmin user(a user who is a part of the
"Users" group), it throws an exception at a point in the code where
RijndaelManaged class is instantiated. Exception thrown is "Requested
registry access is not allowed". Any help wld be highly appreciated.

What kind of help are you expecting? The exception is pretty clear, and
the correct solution is to ensure that you in fact have the right security
access to the registry key you're trying to modify. Usually when an
application runs into something like this, it's because the application is
not intended for actually doing administrative things on the computer, but
is inappropriately trying to write data to administrative-related areas of
the registry.

You either need to fix the program so that it doesn't inappropriately
write to administrative-related areas of the registry, or make sure you
are running the program with the correct security privileges.

Pete
 
Peter,

As i read the question, the exception is thrown when the RijndaelManaged
class is instatiated. This tells me that some registry key is accesed during
this process. Which? And if the RijndaelManaged class requieres acces to som
registry key when instantiating, how do you fix your program so it does not
requeire acces to that key?

Best regards,

Benny
 
Peter,

As i read the question, the exception is thrown when the RijndaelManaged
class is instatiated. This tells me that some registry key is accesed
during
this process. Which?

I don't know. The OP didn't post a concise-but-complete example of code
that would consistently reproduce the problem, so it's not even possible
to say in this case unless you have specific knowledge of the workings of
that class. I don't.

However, someone debugging the code when the exception happens ought to be
able to.
And if the RijndaelManaged class requieres acces to som
registry key when instantiating, how do you fix your program so it does
not requeire acces to that key?

Again, I don't know. Without knowing what the OP is doing that would
cause instantiating the object to try that registry access, it's not
possible for me to answer that question. There's only one constructor for
the RijndaelManaged class, and using it does not by default cause a
security-restricted registry access.

If the class requires that access, then the only fix is to either provide
a way for the user to elevate their privileges, or stop using the class in
a way that causes that attempt to access the registry (or stop using it
altogether, though presumably that's not a very good solution).

So, I'm still left wondering what sort of help the OP expects. No code
was posted, no suggestion as to why they are in this situation in the
first place. They *do* get an exception, and my experience has been that
when the code actually *stops* (exception, null reference, etc) it's
fairly easy to look at the current state of the program and figure out
what is wrong. But only the OP can do that.

Pete
 
Back
Top