Re: "Access Denied" to ICatalogCollection from asp.net web service
From: Ollie (why)
Date: 05/22/04
- Next message: simon kittle via .NET 247: "running .net code from internet"
- Previous message: Ollie: ""Access Denied" to ICatalogCollection from asp.net web service"
- In reply to: Ollie: ""Access Denied" to ICatalogCollection from asp.net web service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 22 May 2004 12:08:51 +0100
found this
http://www.dotnet247.com/247reference/msgs/25/128688.aspx
"Ollie" <why do they need this!!!!> wrote in message
news:O96f0L9PEHA.2512@TK2MSFTNGP12.phx.gbl...
> 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("TransientSubscriptions");
>
> subscription = (ICatalogObject)transientCollection.Add();
> subscription.set_Value("Name",subName);
> subscription.set_Value("SubscriberInterface",subscriber);
>
> string eventClassString = "{"+eventClass.GUID.ToString()+"}";
> subscription.set_Value("EventCLSID",eventClassString);
>
> 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();
> }
>
>
- Next message: simon kittle via .NET 247: "running .net code from internet"
- Previous message: Ollie: ""Access Denied" to ICatalogCollection from asp.net web service"
- In reply to: Ollie: ""Access Denied" to ICatalogCollection from asp.net web service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]