Can't invoke DCOM call from ASP.NET

R

Ron Baakkonen

I want to wrap a legacy COM dll within an ASP.NET app. The dll
incorporates a DCOM call to a remote server and will return data,
which the ASP.NET application will pass through. Changing either the
dll or the server interface it speaks to will be difficult.

I built an Interop wrapper for the COM dll and it runs fine from a
..NET console application.

However, when I try use the same wrapper from within an ASP.NET
application, it fails. The Event Viewer shows me:

DCOM got error "No such interface supported " from the computer
DEVSERV when attempting to activate the server:
{5001A9D4-6FC0-11D4-8B67-0001023E56B0}


I've set the IIS default web site directory security user name to a
valid user account (my own) and have put the line

<identity impersonate="true"></identity>

in my project's web.config file.

Can anyone help? Thanks.
 
E

Egbert Nierop \(MVP for IIS\)

Ron Baakkonen said:
I want to wrap a legacy COM dll within an ASP.NET app. The dll
incorporates a DCOM call to a remote server and will return data,
which the ASP.NET application will pass through. Changing either the
dll or the server interface it speaks to will be difficult.

I built an Interop wrapper for the COM dll and it runs fine from a
.NET console application.

However, when I try use the same wrapper from within an ASP.NET
application, it fails. The Event Viewer shows me:

DCOM got error "No such interface supported " from the computer
DEVSERV when attempting to activate the server:
{5001A9D4-6FC0-11D4-8B67-0001023E56B0}

It looks as if the DCOM assembly wrapper GAC registrion has not taken place.
Create a wrapper using AL.EXE
and place it inside your ASP.NET code... using GACUTIL you can tell the
environmnet to trust the assembly... if you're environmnent is very save,
you'll also need to create and place a strong key inside your new assembly
wrapper using sn.exe, no easy tasks but using the msdn you'll come very far.
http://msdn.microsoft.com/library/en-us/dnanchor/html/netfxanchor.asp?frame=true

besides, using DCOM at a HTTP level server, is not a good choice, because of
thread blocking it utilizes... A DCOM server is thread affinity tuned while
ASP and ASP.NET are not.
 
R

Ron Baakkonen

Thanks for the reply. I'll play around and see if I can get this to
work.

However, it sounds like I should try a different approach. I've got a
substantial in-house application written in unmanaged C++ (COM/ATL/etc.)
that supports a bunch of VB clients.

I would like to make this server available via web services. However, I
don't want to put the server directly in the DMZ. What is the best way
to communicate between IIS and my server? I've got a legacy DCOM dll
that does the job just fine for our VB apps and the simplest thing would
be to reuse it. However, it sounds like this isn't terribly efficient,
any suggestion?

Thanks.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top