Solved

ASP classic use a VB.NET 2008 class library DLL

Posted on 2009-04-01
4
530 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

740 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