473,398 Members | 2,188 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,398 software developers and data experts.

"Access Denied" to ICatalogCollection from asp.net web service

I am trying to access the transients subscriptions for a remote COM+ server
from an asp.net web service, the problem is access rights to save to the
local transient subscriptions, the code fails when I attempt to call
'SaveChanges' a System.UnauthorizedAccessException is generated.

So what access rights to I have give to the asp.net process for it to work
or do I have to use impersonation to setup the subscription?

The code is written in C# and OS is Windows 2003 + IIS 6., the code is shown
below....

Cheers in advance
Ollie

static public void Add(string subName,Type eventClass,Type
sinkInterface,string method,object subscriber)
{
Type sinkType = subscriber.GetType();

//Verify the interface has that method
if(method != "")
{
MethodInfo info = sinkInterface.GetMethod(method);
if(info == null)
return;
}

//Adding a new transient subscription to the catalog
ICOMAdminCatalog catalog;
ICatalogCollection transientCollection;
ICatalogObject subscription = null;

catalog = (ICOMAdminCatalog)new COMAdminCatalog();
transientCollection =
(ICatalogCollection)catalog.GetCollection("Transie ntSubscriptions");

subscription = (ICatalogObject)transientCollection.Add();
subscription.set_Value("Name",subName);
subscription.set_Value("SubscriberInterface",subsc riber);

string eventClassString = "{"+eventClass.GUID.ToString()+"}";
subscription.set_Value("EventCLSID",eventClassStri ng);

string sinkString = "{" +sinkInterface.GUID.ToString()+ "}";
subscription.set_Value("InterfaceID",sinkString);

subscription.set_Value("MethodName",method);
subscription.set_Value("FilterCriteria","");
subscription.set_Value("PublisherID","");

// FAILS HERE
transientCollection.SaveChanges();
}
Nov 16 '05 #1
0 1821

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

Similar topics

0
by: Ollie | last post by:
I am getting an Access Denied to COM+ catalog when attempting to save changes.... So I now use impersonation to impersonate an admin account on the machine so that I can create a transients...
0
by: Jon Rista | last post by:
Hello. I'm trying to automate Excel in a C# Windows Service. This windows service has to be able to access files on network shares, so it uses a domain account on a WinNT 4.0 domain server, rather...
1
by: Winterminute | last post by:
If I try to make any changes to the ASP.NET Portal Starter kit it fails with an access denied error. This was working when I left last week and is failing today. I don't remember changing...
6
by: ASP.Confused | last post by:
I have an ASP.NET page writtein in VB that uses ADODB. I just had to force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses this, and I wanted to be compatible with them.) I...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
0
by: Brian Call | last post by:
We have a customer that is getting an "Access is denied" (to a specific dll in the application's bin directory) error on XP when trying to run an ASP.NET application. All the posts and KB articles...
0
by: lpinho | last post by:
Hi There, I've generated a C# file from a wsdl file using wsdl.exe utility. Then I created a console application and made a call to the method generated, first I got the error: "The request...
2
by: =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post by:
I have a service running on my PC. I want to set the service's PriorityClass to BelowNormal. I use the following code: Process process = GetServiceProcess(); // How can I get the user's token...
2
by: =?Utf-8?B?bXVyYWRqYW1lcw==?= | last post by:
Yes, sorry I tried to make it clear in the original question that I want to get the user token of the service - ie. the account the service is running under. I know services don't have user tokens...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.