Solved

ASP classic use a VB.NET 2008 class library DLL

Posted on 2009-04-01
4
517 Views
Last Modified: 2012-05-06
Hi,

I have a website written in ASP which needs to access functions in a VB.NET 2008 class library compiled DLL.

I've been following this tutorial: http://www.justskins.com/forums/asp-accessing-a-vb-net-dll-43525.html but receive the following error when opening my ASP page:

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/Default.asp, line 28
800401f3

The only thing I skipped in that tutorial was adding the assembly to the GAC, as I couldn't find gacutil.exe on my server.

Has anyone has success doing this with a VB.net 2008 class library and ASP, or know of any tutorials on the net?

Thanks,

Andrew
0
Comment
Question by:undyshelts
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
vbwizardry earned 500 total points
ID: 24046062
as long as you have signed the assembly simply brows to the windows folder and drag|drop this assembly in to assembly folder.

also search for gacutil.exe under C:\WINDOWS\Microsoft.NET\Framework\ folder. It will be in one of the foldels in there.
0
 
LVL 1

Author Comment

by:undyshelts
ID: 24046216
Thanks vbwizardry, copied gacutil from my development machine to the server, ran it and all worked ok. I didn't know about the c:\windows\assembly folder, my DLL was already in there but uninstalled it and dragged it in again, and it's appearing in there ok. Though website still coming up with the same error.

Have included my default.asp file as a code snippet... I have also been fiddling around with a global.asa file with the DLL's GUID/UUID included... but no success with that either.. have included this file in the code snippet too...
------------------------------------
default.asp
------------------------------------
 
<html>
<head>
</head>
<body>
<%
dim obj
set obj = CreateObject("COMInteropTest.TestClass")
obj.SayHello
set obj = nothing
%>
</body>
</html>
 
 
------------------------------------
global.asa
------------------------------------
<!--==Visual InterDev Generated - startspan==-->
<!--METADATA TYPE="TypeLib" NAME="COMInteropTest" UUID="{39ab48ff-0e02-4903-abb7-7bba1f8e9dcd}" VERSION="1.0"-->
<!--==Visual InterDev Generated - endspan==-->
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
</SCRIPT>

Open in new window

0
 
LVL 7

Assisted Solution

by:vbwizardry
vbwizardry earned 500 total points
ID: 24046352
Dont forget you have to register your assembly as COM
regasm [assemblyname].dll /tlb:[assemblyname].tlb
look for regasm  in one of the [C:\WINDOWS\Microsoft.NET\Framework\] sub folders
0
 
LVL 1

Author Comment

by:undyshelts
ID: 24046725
Thanks, working a treat now :-)
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Alert on Server memory 2 21
ASP/VB email question 4 34
How come this regular expression allows "e"? 14 36
asp.net mvc5 6 16
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question