Re: Newbie Q about base classes and where to put them

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for the quick response, Eliyahu...

(remember I'm using VS2005..)

I've set up a DLL and placed it elsewhere on my file-system (ie NOT
under my web services directory) and added a Reference to it. I notice
that a copy of that 'master' DLL is then made in a \Bin folder.

What happens if I update my 'master' DLL? Will I need to 'recompile'
the web service?

Thanks

Steve

Eliyahu Goldin wrote:

Steve,

1. You should create a class library project and put the classes there. Then
you can add the same project to multiple solutions.

2. The project will compile into a dll.

3. You will need to add a reference to that project to other projects that
will use it.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


<google@xxxxxxxxxxxx> wrote in message
news:1161594979.418476.62830@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Struggling a bit with some newbie questions regarding base classes,
header files and the like in ASP.NET/C#.

(Using VS2005, C# and ASP.NET 2, and new to them all...)

I'm going to be creating about 200 web services that will share some
similar features. I want to abstract out this common functionality
into a baseclass and inherit from that. So far, so good. If I put the
base class in the App_Code directory for a single web service then all
is fine. But I want to use the same base class in my other web
services.

My questions

1. Can I use a base class that is accessible to all my web services?
If I can then where do I put it and how do I refer to it in VS?

2. MUST my baseclass stuff go into a pre-compiled DLL?

3. Can I do compile time '#includes' or equivalent?

Thanks...

(Please reply to the group as the email address I use to post gets too
much spam...)

Steve


.



Relevant Pages

  • Re: Web Service/Impersonation Issue - RESOLVED
    ... with the Windows DLL named "security.dll". ... > to various web services for data retrieval. ... The MS SQL Server calls do not cause any issues, ... I've compared IIS configuration as ...
    (microsoft.public.dotnet.security)
  • Re: How to use .RESX or .RESOURCE to retrieve list of strings
    ... reading about the different flavors of web services that can be ... This project does not create a DLL ... Can I still use resources from a .RESX file in this scenario? ... A possibly easier method is to add a Resource RESX file to your DLL ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: unable to load DLL (<filename>.dll)
    ... However, since you placed it in the bin directory, I would assume that ... i'm currently working on web services using C#. i've> used external DLL in my project. ... > i've try to put the dll file in the bin folder of the web> service project, the System32 folder and added reference> to the dll in the web service project. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Webservice Error Unable to find System.Web
    ... against the dll you think is the correct one. ... If that pans out, you'll need ... to make sure that the url that the web services is called from contains that ... The project does have a reference to the System.Web assembly. ...
    (microsoft.public.dotnet.framework)
  • Re: Is this a viable design idea?
    ... The base class is indeed just an interface and the 'real' external ... DLLs implement that interface. ... The way I have designed it now (with circular reference), ... >2) Your Order object is used BY your external dll, ...
    (microsoft.public.dotnet.general)