Changing execution privilege

R

Raster

Hi U all.

Any good ideas (examples) to solve following problem?
I have a managed Web Applications using Windows authentication and
running with current users privileges (impersonated). I would like to
run one method with domain administrator privilege because users has not
enough right to do that operation. How this can be done?
I have tried to make COM+ component and run it in app with admin
privileges - with poor success. When I try to make reference to this
component I get error message:

"A reference to 'XXXXXXXXXX' could not be added. Converting the type
library to a .NET assembly failed. Type library XXXXXXXX was exported a
CLR assembly and can not be re-imported as CLR assembly."

What is the easiest way to this problem? Programming language I use is c#.

Thanks in advance!

-Antti Mikkonen
 
T

Tasos Vogiatzoglou

Use the component as any other .NET class...
Don't try to use it as a COM+ component.

..NET will figure out that it's a COM+ and will call it.

You have derived the component class from ServicedComponent, right?
 
R

Raster

Yes, my component class is derived from ServiceComponent.
So you mean I make a reference to dll or project and add my component to
Component Services?
 
T

Tasos Vogiatzoglou

You make a reference to the dll and project and you use it as a normal
class ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top