This is a permissions issue. The ASP.NET application likely runs under a
specific account (ASPNET or NETWORK SERVICE) that doesn't have access to the
registry. If this is a DLL object, it will inherit the user context.
If you can't change permissions you will have a tough time dealing with
this. One thing you can do is move the page to a different folder, and set
the folder up to use Impersonation in web.config. Then change the access to
the page to a user that would have rights and that works.
You can also change the registry permissions for the key/keys you're writing
to to allow NETWORK SERVICE.
+++ Rick ---
--
Rick Strahl
West Wind Technologies
http://www.west-wind.com/ http://www.west-wind.com/weblog/ http://www.west-wind.com/wwThreads/
----------------------------------
Making waves on the Web
"WTH" <no****@spamtheman.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
...I call a method on it which trys to read the registry. I can
open/close/manipulate databases just fine but the registry? Bang,
exception...
The object works fine from a regular C# windows application, a VB .Net
app, or an unmanaged C++ app.
The weird thing is, this older COM object I have which was written by
someone else reads the registry just fine and I can't see any differences
between the two projects to account for this. Is there some 'com object
permissions' place? They both are being instantiated by IIS and (I
assume) running as the user 'Network Service.'
WTH