473,395 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

WTH
....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
Nov 18 '05 #1
1 1037
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

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: Shannon Jacobs | last post by:
Sorry to ask what is surely a trivial question. Also sorry that I don't have my current code version on hand, but... Anyway, must be some problem with trying to do the negative. It seems like I get...
8
by: vbMark | last post by:
When using regular, non .NET asp, I would write an ActiveX DLL COM object in Visual Basic 6 to do all the work on the server. Now I am using ASP.NET with C# and want to do the same. Which C#...
4
by: Együd Csaba | last post by:
Hi All, I'd like to "compress" the following two filter expressions into one - assuming that it makes sense regarding query execution performance. .... where (adate LIKE "2004.01.10 __:30" or...
14
by: Andy B | last post by:
I need to create a regular expression that will match a 5 digit number, a space and then anything up to but not including the next closing html tag. Here is an example: <startTag>55555 any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.