COM+  
Author Message
Me_Titus





PostPosted: Visual C# General, COM+ Top

Hi you all,

Well I was I VB6 developper and I am now trying to build a COM+ component using C#, but till now I had no luck.


Can anyone help me in this matter.

Any help is welcome,

MeTitus


Visual C#14  
 
 
Galin Iliev





PostPosted: Visual C# General, COM+ Top

see this article http://my.execpc.com/~gopalan/dotnet/complus/complus.net_accountmanager.html

I think it could help you to start....



 
 
Me_Titus





PostPosted: Visual C# General, COM+ Top

Thanks to the information in this link I was able to create the COM component, but other problem has arised. The component I created has to run using specific user credential, and I am setting that in the components manager, but the when I call the COM thru an ASP.net application, the process runs using the asp.net account.

Does anyone have any idea on how to go around this problem


Many Thanks,

MeTitus

 
 
Galin Iliev





PostPosted: Visual C# General, COM+ Top

I think you sould impersonate user before call COM form asp.net page and then return to asp.net accounr

see more resources here :

hope this helps



 
 
RMD





PostPosted: Visual C# General, COM+ Top

You could use impersonation, as the previous poster suggested, or you could run your component in Component Services as a COM+ Application. See:

http://support.microsoft.com/kb/q306296

You can then have the COM+ Application run as a specific user.

 
 
Me_Titus





PostPosted: Visual C# General, COM+ Top

http://support.microsoft.com/kb/q306296

This is exactly what I have done before. I used this help to build my first COM+...

Still I am having this problem, I will try to use the impersonation method, to see if I can get any good results.

Thanks for your help,


MeTitus

 
 
Me_Titus





PostPosted: Visual C# General, COM+ Top

I have placed the line below, in my web.config file.

<code>

<identity impersonate="true" userName="accountname" password="password" />

</code>

When in one of my aspx files I run a process that calls a script file, that process appears
in the taskbar under the asp.net user credentials. I am sure the web applcation
is using the credentials I passed in, because when I print the user credential:

<code>

System.Security.Principal.WindowsIdentity.GetCurrent().Name

</code>

it prints out the right user.


Any idea why this is happening


Thanks

Metitus

 
 
Galin Iliev





PostPosted: Visual C# General, COM+ Top

Are you sure the user you impersonate has rights to execute COM Application