Richard Markette
Richard Markette

Reputation: 41

Custom .net assembly in classic ASP- error 0177 : 80004003

I have been working on this for days and made progress but it is still not working the way I need it to.

First off this project is taking an existing huge site (100,000+ lines of code spread out over at least 200+ files) written in classic asp (vbscript) and converting to .NET framework.

The existing code uses VBScript classes, for the most part, and my plan is to make a mimic of the dozen or so classes that are already defined into a .NET assembly that both the new .NET version and the existing Classic ASP pages can use - through COM+.

I have made the first class definition, replicated in .NET and it works in my Test.ashx page on the development server (when I go to the page in my browser, I get the expected output). But I receive an error calling it from the Test.asp page Server object error 'ASP 0177 : 80004003' on the line that calls set obj = server.CreateObject("MyLibrary.MyClass").

I have registered the custom DLL via regasm like this regasm "C:\inetpub\siteroot\bin\MyLibrary.dll" /tlb /codebase and it seemed to work fine (the library appears in the server's Component Services as expected with the methods defined and everything seems fine.

My gut is telling me that it is either a 32-bit/64-bit problem or a permissions problem. I have tried a number of different things over the days that are too numerous to recount, but any suggestions would be greatly appreciated.

NOTES:

The top portion of the .vb file for this first class is as follows

Imports System
Imports System.Web
Imports System.Web.HttpContext
Imports System.String
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Runtime.InteropServices
Imports System.EnterpriseServices

<Assembly: ApplicationName("MyLibrary")>
<Assembly: ApplicationActivation(ActivationOption.Server)>
<Assembly: ApplicationAccessControl(False, AccessChecksLevel:=AccessChecksLevelOption.ApplicationComponent)>

<ComClass(MyClass.ClassId, MyClass.InterfaceId, MyClass.EventsId), ProgId("MyLibrary.MyClass")>
Public Class MyClass
    Inherits ServicedComponent
    [GUIDS]
    [subs and functions ... ]

Upvotes: 1

Views: 1088

Answers (1)

Richard Markette
Richard Markette

Reputation: 41

I finally got it working... all the different things I tried apparently was preventing me for seeing any of the changes I was making in my further attempts. I say this because today I tried starting over - I went onto the server and cleaned the registry of all occurrences of my assembly's name and I removed it from GAC, everywhere I could think of.

Then on my local computer I used Visual Studio to "Publish" the website that references the custom DLL. It instantly worked on my Test.ashx page. So then I registered the DLL using regasm (64-bit) as before and boom it worked on the ASP side too!

I did not receive any suggestions but thank you to anyone who gave this any thought.

Upvotes: 1

Related Questions