Call ASP.NET DLL from ASP 3.0 - Newbie

M

Mark Reichard

Sorry for what is probably (to those who understand .NET better) a
repeat post --- I've searched but not found details that lead me in
the right direction.

We have a Web-based application written in COM+, VB6 and ASP 3.0 with
SQL 2000. We want to migrate the VB COM+ backend component to ASP.NET
but ideally not the ASP front end.

Our only driver for this work is that our clients do not want to
install a COM component --- they want to simply load a .NET DLL in the
proper directory and have it work. Also, many Web hosting companies
will not install a 3rd party COM component, but they apparently will
install an ASP.NET DLL (I guess this make sense, but I don't
understand why).

Can I update my ASP 3.0 pages to call an ASP.NET DLL from ASP 3.0
WITHOUT registering the .NET DLL? If so, can someone provide either a
detailed hello world type example or a link?

Thanks,
Mark
 
J

Jim Cheshire [MSFT]

Hi Mark,

ASP 3.0 would have to call the .NET component via a COM callable wrapper
(CCW). Therefore, you would have to register the type library for the .NET
component. In order for a COM-based architecture like native ASP to call
any external component, that component has to be registered.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
 
G

Guest

A COM component and a .NET Assembly are so different from what I have seen there is no way to directly call the .NET assembly withough registering it in COM first using the regasm command line tool. Side by Side execution or the XCOPY deployment strategy will most likely not work.

What you can do is, convert all of your .asp pages to .aspx pages. All this would require you doing is adding the PAGE directive at the top of the page with the aspcompat = True. And, then renaming all of you asp pages to .aspx. You don't have to change any of your code. Asp is fully compatible with ASP.NET. Then you can take advantage of using the .NET assembly in your aspx pages.

HOpe this helps
 
J

Jim Cheshire [MSFT]

Please make sure that you do NOT set AspCompat unless you truly understand
why you are doing it. What AspCompat does not mean "make these pages ASP
compatible." What it does is cause the ASP.NET threads to execute as STA
threads in cases where your ASP.NET page is calling an STA COM component.
If you set it on a page where it is not necessary, you are going to cause
serious problems for yourself.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
Thread-Topic: Call ASP.NET DLL from ASP 3.0 - Newbie
thread-index: AcRoWKeOeIvIkoEOROWig1nb0RgmyQ==
X-WBNR-Posting-Host: 64.132.155.142
From: "=?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?="
References: <[email protected]>
Subject: RE: Call ASP.NET DLL from ASP 3.0 - Newbie
Date: Mon, 12 Jul 2004 14:39:05 -0700
Lines: 29
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:246471
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

A COM component and a .NET Assembly are so different from what I have seen
there is no way to directly call the .NET assembly withough registering it
in COM first using the regasm command line tool. Side by Side execution or
the XCOPY deployment strategy will most likely not work.
What you can do is, convert all of your .asp pages to .aspx pages. All
this would require you doing is adding the PAGE directive at the top of the
page with the aspcompat = True. And, then renaming all of you asp pages to
.aspx. You don't have to change any of your code. Asp is fully compatible
with ASP.NET. Then you can take advantage of using the .NET assembly in
your aspx pages.
 
M

Mark Reichard

Thanks to both of you for the answers. This gives me a direction to
work in and some things to try.

Thanks,
Mark
 
J

Jim Cheshire [MSFT]

Hi Mark,

You're welcome!

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
 

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,998
Messages
2,570,242
Members
46,834
Latest member
vina0631

Latest Threads

Top