Click here to Skip to main content
15,898,134 members
Home / Discussions / COM
   

COM

 
AnswerRe: COM Error :( Pin
Stephen Hewitt7-Jun-07 15:05
Stephen Hewitt7-Jun-07 15:05 
QuestionRe: COM Error :( Pin
gvanto7-Jun-07 15:42
gvanto7-Jun-07 15:42 
AnswerRe: COM Error :( Pin
Stephen Hewitt7-Jun-07 15:46
Stephen Hewitt7-Jun-07 15:46 
QuestionRe: COM Error :( Pin
gvanto7-Jun-07 19:18
gvanto7-Jun-07 19:18 
AnswerRe: COM Error :( Pin
Stephen Hewitt7-Jun-07 19:31
Stephen Hewitt7-Jun-07 19:31 
QuestionQueued Component Pin
SoftDeveloper6-Jun-07 2:41
SoftDeveloper6-Jun-07 2:41 
QuestionHow to use my COM object in a VS2003 - MFC exe? Pin
jayart5-Jun-07 6:32
jayart5-Jun-07 6:32 
QuestionCOM Delegation in ASP.NET Pin
Talal Sultan4-Jun-07 23:45
Talal Sultan4-Jun-07 23:45 
Hi people,

I have an ASP.NET application that uses a COM (locally) to do some number crunching. Everything works fine when the COM is installed on the same machine as the web application. In fact, the ASP.NET application uses a web service to access the COM. The web service is also on the same machine.

Now, for performance reasons, we have decided to distribute the COM to several machines on the network so that we can have some distributed computing. I am not the one who is responsible for the COM development. For testing purposes, we have installed the COM on a remote machine and have created a .NET assembly that will interact with it.

First, I tried the concept using a console application. I reference the assembly, instantiate the class and perform the calculations. The COM works fine on the remote machine with no problems.

Now I am trying to make the ASP.NET application do the same thing as the console application but it's not working. I reference the assembly in my web service code but the call fails.
I know that the COM needs to be configured on the remote machine to allow access and execution. I have noticed that the account that should be used to contact the COM should be a domain account. When I run the console application from my machine, the Dllhost process on the remote machine shows well my username as owner.

I have suspected that because the web application runs with the ASPNET account, it wasn't allowed to run the COM on the remote machine. I have tried using impersonation to switch to my account inside the web service code. The impersonation works fine inside the code. When I debug, I can see that the Environment.UserName field goes from ASPNET to my username. However this doesn't solve the problem.

To check if the impersonation was working, I have tried calling my console application from inside the web service application using the Process class. When I go to the taks manager to see the processes list, I see that ASPNET is the owner of the console application. I have tried calling notepad also and I got the same thing.

So my first questions are:

Does impersonation work only inside the code? Why is my process running under ASPNET?

I have also read some things about delegation to allow a COM to be called across a network. I did some research about the matter and there were some things that needed to be set by the admin, to allow the impersonating account be used for delegation and the impersonated account also. We did all that but still it's not working. I'm sure I'm still missing a lot of stuff since I didn't find any article online that would explain the whole process.

My second question is:

Can anyone point to a URL or maybe explain to me how this delegation works? or maybe if someone has a way to launch a COM across the network, some tips, etc...


Thank you all for your efforts.

Talal


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook

QuestionAbout COM Pin
vijay_834-Jun-07 19:13
vijay_834-Jun-07 19:13 
AnswerRe: About COM Pin
CPallini4-Jun-07 20:52
mveCPallini4-Jun-07 20:52 
AnswerRe: About COM Pin
Michael Dunn5-Jun-07 19:04
sitebuilderMichael Dunn5-Jun-07 19:04 
QuestionConfusion Pin
SoftDeveloper3-Jun-07 22:21
SoftDeveloper3-Jun-07 22:21 
AnswerRe: Confusion Pin
Steve S4-Jun-07 21:22
Steve S4-Jun-07 21:22 
QuestionGUID Pin
john56321-Jun-07 23:32
john56321-Jun-07 23:32 
AnswerRe: GUID Pin
CPallini3-Jun-07 22:32
mveCPallini3-Jun-07 22:32 
QuestionDll redirection vs side by side installation Pin
tom groezer1-Jun-07 10:04
tom groezer1-Jun-07 10:04 
QuestionCan not create activex component Pin
riteshfirst1-Jun-07 1:24
riteshfirst1-Jun-07 1:24 
Questiongenerating a stub dll from a tlb Pin
NikoTanghe31-May-07 4:01
NikoTanghe31-May-07 4:01 
QuestionCoTaskMemRealloc Pin
bvivekb4u31-May-07 1:21
bvivekb4u31-May-07 1:21 
AnswerRe: CoTaskMemRealloc Pin
CPallini31-May-07 2:07
mveCPallini31-May-07 2:07 
QuestionHow to implement ISimpleFrameSite in activex control by VC++ Pin
a.thanomsak29-May-07 17:34
a.thanomsak29-May-07 17:34 
QuestionC++ to C# array Pin
Stevo Z29-May-07 3:59
Stevo Z29-May-07 3:59 
AnswerRe: C++ to C# array Pin
CPallini29-May-07 4:09
mveCPallini29-May-07 4:09 
GeneralRe: C++ to C# array Pin
Stevo Z29-May-07 4:16
Stevo Z29-May-07 4:16 
Questionweird error Pin
imanos28-May-07 23:36
imanos28-May-07 23:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.