How to reference a DLL from aspx.

M

Michael Giroux

I have an asmx that Inherits a class that is defined in a dll. The asmx and
dll are in the same directory. The asmx gets compile errors because the
class it inherits is not know. Looking at the generated compile command,
the dll is not being referenced -- there is no /R:my.dll option in the
command line.

I've been searching for several hours but cannot figure out how to cause
ASP.NET to include a /r:mydll in the compile.

Can someone point me to the docs for how to accomplish this?

It looks like web.config might be the place to fix this, but I cannot see an
option that lets me control the list of referenced dlls.

Thanks

Michael Giroux
 
M

Michael Giroux

No --

c:\inetpub\wwwroot\bsoa\incrementService.asmx
c:\inetpub\wwwroot\bsoa\incrementService.dll

Where should the dll be?

Michael Giroux
 
J

Juan T. Llibre

re:
Where should the dll be?

In the /bin directory, like I said.

See :
http://samples.gotdotnet.com/quickstart/aspplus/doc/writingservices.aspx

Precompiled XML Web services

"If you have a precompiled class that you want to expose as a XML Web service
(and this class exposes methods marked with the [WebMethod] attribute),
you can create an .asmx file with only the following line :

<%@ WebService Class="MyWebApplication.MyWebService" %>

MyWebApplication.MyWebService defines the WebService class,
and is contained in the /bin subdirectory of the ASP.NET application."




Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
 
M

Michael Giroux

Thanks for the tips.

In addition to placing the dll in the bin directory, I had to generate the
abstract class with a namespace. Without the namespace, I was not able to
specify the dll in a Imports statement.

Is there a way in VB to Imports from the default namespace? If not, no
problem since I do now have it working.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top