Solved

ASP classic use a VB.NET 2008 class library DLL

Posted on 2009-04-01
4
541 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PowerShell Core for Advanced Linux Administrators

Understand advanced principals around Powershell Core with a focus on the Linux Administrator.  This course covers how to administer numerous environments across multiple platforms including Linux, Azure, AWS, and Google Cloud from a single shell instance.

Question has a verified solution.

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

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…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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