Solved

ASP classic use a VB.NET 2008 class library DLL

Posted on 2009-04-01
4
498 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks, working a treat now :-)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now