Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > I have a regular ATL COM object which works fine in my ASP.Net page unless...

Reply
Thread Tools

I have a regular ATL COM object which works fine in my ASP.Net page unless...

 
 
WTH
Guest
Posts: n/a
 
      11-02-2004
....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


 
Reply With Quote
 
 
 
 
Rick Strahl [MVP]
Guest
Posts: n/a
 
      11-02-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ...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
>
>



 
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
A JS script which works fine in IE / FF, but not in Opera... (?) Fox Javascript 5 08-20-2007 10:01 AM
This code must have crashed....but works fine hsharsha@gmail.com C++ 14 08-22-2006 01:56 AM
ASP Response Object Error - but works fine in a Virtual Directory Adrian Manic ASP General 1 06-08-2004 01:46 PM
Q: Which one is better for parsing 30MB files ? ATL/COM or VB/COM Ramie MCSD 11 10-30-2003 09:22 PM
Error 80004005 when creating recordset object in ASP file, but works fine in Global.ASA Grahammer ASP General 12 08-21-2003 09:01 PM



Advertisments