.NET Component identity

G

Guest

I have a .NET Web Application that calls a .NET Component

When this was a VB6 Active X DLL COM I added the Component to the Server using the Administrative Component Service Tool. And assigned a single identity for the component to run under

I want to do the same thing for my .NET Component. I need it to run on the server as a single identity

How do I accomplish this

Thanks

jmv
 
G

Guest

You register your .net COM+ components they same way. Your .net class must inherit System.EnterpriseServices.ServicedComponent and the .net assembly must have a strong name. Then you can add the .net dll to a COM+ application with singler user identity using the Component Service Tool just like you used to. You can also register your .net component with COM+ automatically using attributes (http://msdn.microsoft.com/library/d...guide/html/cpconWritingServicedComponents.asp)

Regards, Jakob.
 
G

Guest

If I use the sn.exe to get the strong name on my development machine and then I add to COM+ on my production machine is this good enough to ensure the key pair does not already exist

[assembly: AssemblyKeyFileAttribute(@"..\..\key.snk")] directly in my .cs file with my c# code or does it go in Assembly.cs

What should I be using Assembly.cs for

Thanks.
 
G

Guest

If I use the sn.exe to get the strong name on my development machine and then I add to COM+ on my production
machine is this good enough to ensure the key pair does not already exist

Yes, the key will be unique
[assembly: AssemblyKeyFileAttribute(@"..\..\key.snk")] directly in my .cs file with my c# code or does it go i
Assembly.cs

You can put it anywhere you want
What should I be using Assembly.cs for

Assembly.cs is a file created by VS.net for convenience so that you always know where to find your assembly attributes. You can delete and put the assembly attributes in any other .cs file if you want

Regards, Jakob.
 

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