473,804 Members | 3,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Access Denied" to ICatalogCollect ion 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.Unauthor izedAccessExcep tion 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,s tring method,object subscriber)
{
Type sinkType = subscriber.GetT ype();

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

//Adding a new transient subscription to the catalog
ICOMAdminCatalo g catalog;
ICatalogCollect ion transientCollec tion;
ICatalogObject subscription = null;

catalog = (ICOMAdminCatal og)new COMAdminCatalog ();
transientCollec tion =
(ICatalogCollec tion)catalog.Ge tCollection("Tr ansientSubscrip tions");

subscription = (ICatalogObject )transientColle ction.Add();
subscription.se t_Value("Name", subName);
subscription.se t_Value("Subscr iberInterface", subscriber);

string eventClassStrin g = "{"+eventClass. GUID.ToString() +"}";
subscription.se t_Value("EventC LSID",eventClas sString);

string sinkString = "{" +sinkInterface. GUID.ToString() + "}";
subscription.se t_Value("Interf aceID",sinkStri ng);

subscription.se t_Value("Method Name",method);
subscription.se t_Value("Filter Criteria","");
subscription.se t_Value("Publis herID","");

// FAILS HERE
transientCollec tion.SaveChange s();
}
Nov 16 '05 #1
0 1876

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

Similar topics

0
268
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 subscriptions for a remote COM+ server, but it is still failing with the "Access Denied" what do I need to do to get this to work..... I have used impsersonation successfully in several places in the asp.net web service but it only fails when I am...
0
1683
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 than the Local Service or Network Service, or System account. I'm running into a problem, though, with trying to instantiate Excel. When I execute the following: using Excel = Microsoft.Office.Interop.Excel; using Microsoft.Office.Core; //...
1
7053
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 anything, but I guess something had to be changed. I have checked NTFS permissions and the ASPNET account has full control on the parent directory of that XML file and on the file itself. I have also checked in IIS, and the Virtual Directory has...
6
4143
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 had to manually install all of the ODBC drivers and the rest of the DLL's, and now I am getting "Access is Denied" errors on any page that uses ADODB. How do I fix it? I already gave the ODBC drivers in the folders in "c:\program files\common...
0
3540
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 original question, the subject line is: ADODB.NET and "Access Denied" I have an ASP.NET page writtein in VB that uses ADODB. I just had to
0
1457
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 I have read (such as http://support.microsoft.com/default.aspx?scid=kb;en-us;329065) say that this happens when indexing service is running. But in this case we have verified that it is not running. I have also looked at file permissions and do...
0
2634
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 failed with HTTP status 407: Proxy Access Denied." Then I added a proxy validating and proxy credentials and got this:
2
4796
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 (Local System) from the process, or wherever? using (WindowsImpersonationContext user = WindowsIdentity.Impersonate(userToken))
2
5341
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 - I suspect users do have tokens, hence "user token", otherwise we might call them "service tokens" or somesuch :-) If you read the question again, you migh see that the fundamental question is, *assuming there is no other approach*: The...
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10588
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10324
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7623
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6857
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.