Re: Sharing code between ASP.NET application and Windows service app in the same solution
From: NWx (test_at_test.com)
Date: 03/17/04
- Next message: NWx: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Previous message: Jason Shohet: "Astra QuickTest or Rational Robot for asp.net?"
- In reply to: Martin Dechev: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Next in thread: Martin Dechev: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Reply: Martin Dechev: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Mar 2004 23:06:46 +0200
Hi,
I followed your advice, and I managed to use that DLL into my project (Web
app so far)
I already set the project dependences in Solution properties, and set build
order.
However, I have another problem.
If I make a change in library project source (for example I add a parameter
to a method of a class) and rebuild the whole solution, the changes are not
visible automatically in web application.
Even if I copy myself the new DLL from library project to Web app bin
folder, the changes are not visible
The only way to see them was to remove reference to DLL and add it again
There is something I did wrong?
I use VS.NET 2002
Thank you
"Martin Dechev" <detcheff_@hotmail.com> wrote in message
news:uSZw95BDEHA.3408@tk2msftngp13.phx.gbl...
> Hi, NWx,
>
> Move the business logic layer code to a new Class Library project. Add
> reference to this project in both the web project and the service project.
> Change the method that uses the connection string to receive this string
as
> parameter. Then in the web project pass the stored value in the
web.config.
> In the service project either hard-code the value or create a .config file
> for the service and store the value in it.
>
> Hope this helps
> Martin
> "NWx" <test@test.com> wrote in message
> news:Oxo8IEBDEHA.3408@tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I have a solution with two projects - an ASP.NET application, and a
> Windows
> > service
> >
> > ASP.NET application was developed first, and for it I wrote some classes
> in
> > a Business logic layer
> >
> > I want to share the same code with the Windows service, but if I drag
the
> > BLL subfolder with all files form Web application project to Windows
> service
> > project, those files are actually copied to Windows service folder, So
in
> > this case I'll have two copies of them and if I want to add some code, I
> > have to make changes in both places.
> >
> > Is there any way to really "share" the source file between the two
> > applications? How?
> >
> > And another issue
> >
> > In those classes, I use SQL helper class to connect to database.
> > In Web application I pass the connection string, with a line as follows
> >
> > myDS = SqlHelper.ExecuteDataset(
> >
> > ConfigurationSettings.AppSettings(Global.CfgKeyConnString),
> >
> > CommandType.StoredProcedure,
> >
> > "MyMethod", ...)
> >
> >
> >
> > But this uses a constant CfgKeyConnString, defined in ASP.NET Global
> > application object
> >
> > The win service doesn't have this object. How can I solve this, to use
> > exactly the same code to retrieve different settings from configuration
> file
> >
> > My thought is to create public class in Win service, assign it to a
> > variable named Global, and define some constants in that class.
> >
> > Does anyone have a better thought?
> >
> >
> >
> > Thank you
> >
> >
> >
> >
>
>
- Next message: NWx: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Previous message: Jason Shohet: "Astra QuickTest or Rational Robot for asp.net?"
- In reply to: Martin Dechev: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Next in thread: Martin Dechev: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Reply: Martin Dechev: "Re: Sharing code between ASP.NET application and Windows service app in the same solution"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|