To add to Patricks suggestion, if you are putting it in the GAC to be used
by ASP via Interop, or ASP.NET, then make sure you set your assembly culture
information to be neutral, or your assembly probably wont load.
--
Regards
John Timney (Microsoft ASP.NET MVP)
----------------------------------------------
<shameless_author_plug>
Professional .NET for Java Developers with C#
ISBN:1-861007-91-4
Professional Windows Forms
ISBN: 1861005547
Professional JSP 2nd Edition
ISBN: 1861004958
Professional JSP
ISBN: 1861003625
Beginning JSP Web Development
ISBN: 1861002092
</shameless_author_plug>
----------------------------------------------
"Patrick Steele [MVP]" <> wrote in message
news: m...
> In article <yKqdnZPHvccTZY-iU->,
> says...
> > Ok, I've been hung up on this issue for quite some time now and I would
> > like some help in getting it to work. I think this may be a setup issue
> > but I'd like to ask your eminences first.
> >
> > Here's some backstory: I need to create a VB.NET classlibrary (or
another
> > structure) to use objects for our business logic. However, as our
upgrade
> > is an ongoing process, I must enable this structure to be run in both
ASPX
> > and ASP pages.
> >
> > Here's what goes wrong: I create a new solution. Create two projects,
one
> > a ASP.NET web app, the other a classLibrary. I put a basic hello world
> > object into the classlibrary then get a return string from it in both an
> > ASP and ASPX page. Yes, the classlibrary has the build option checked
to
> > "register for COM interop."
> >
> > Now, the ASPX page runs fine - but the ASP page gives me the following
> > cryptic error:
> >
> > Error Type:
> > (0x80070002)
> > /webApplication1/test1.asp, line 3
> >
> > Line 3 is the Server.CreateObject command for the object in question.
> >
> > No error string. The error code, when googled, reveals that it's "file
not
> > found." That's about as useful as a kick in the ass. What am I doing
> > wrong? Why can't my ASP page use this object? If I can only get this
> > functional then I will have no further issues - we can start moving our
> > business logic and data logic from the legacy ASP pages to an
object-based
> > back end. Please help!!
>
> I would strong-name the assembly and place it in the Global Assembly
> Cache (GAC). Since your library is a .NET library, the same rules for
> locating the assembly apply even when running in COM-interop: first the
> GAC is checked, then the current directory (based on the EXE running).
>
> Since your assembly isn't in the GAC, the only place to look would be
> the "current directory" of whatever process is running the ASP page (I'm
> not sure exactly which process that is). Placing it in the GAC will
> alleviate this problem.
>
> --
> Patrick Steele
> Microsoft .NET MVP
> http://weblogs.asp.net/psteele