asp.net dlls called from outside

T

tshad

I have my Classes that I have built in asp.net and the Dlls go into the bin
folder

I need to write a service that will run on the Web service and will access
Sql Server to find clients that have met certain criteria and will send
emails to them. I already have these functions written in my classes in my
Dlls. As a matter of fact, most of the code in the service will be the same
as the asp.net code - without the user interface.

Do I need to make separate Dlls (classes) or can I call the classes that are
in the bin folder?

Thanks,

Tom
 
J

jasonkester

No worries. Just split out a separate class library project with the
common functionality. Reference it from your web project and from your
second app. They'll grab their own copies of all the right dlls for
their bin directories.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 
T

tshad

jasonkester said:
No worries. Just split out a separate class library project with the
common functionality. Reference it from your web project and from your
second app. They'll grab their own copies of all the right dlls for
their bin directories.

I don't really have a Project to build my classes. I just build it from DW
and run a make file from web Directory. I then move it to my bin directory.

I am building my Windows Service from VS.Net. When I make a change to the
Dll, will it grab the new copy and move it to it's directory?

I use one Namespace for all my functions (called MyFunctions) and move each
DLL into the Bin folder. Can I still use the same namespace or do I have to
have a different one for Service?

Thanks,

Tom
 
J

jasonkester

Even better. You're already exporting a class library. Just drop a
copy of your dll into the bin directory for your new app, and you
should have access to the MyFunctions namespace.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 
T

tshad

jasonkester said:
Even better. You're already exporting a class library. Just drop a
copy of your dll into the bin directory for your new app, and you
should have access to the MyFunctions namespace.

So everytime I make a change, I would move the Dll to both bin directories?

Thanks,

Tom
 
J

jasonkester

Yep. If you don't want to use projects or make files, you'll have to
do all your .dll moving by hand.

Any particular reason you're shying away from using an IDE for all
this? Seems like you're creating a lot of extra work for yourself.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 
T

tshad

jasonkester said:
Yep. If you don't want to use projects or make files, you'll have to
do all your .dll moving by hand.

Any particular reason you're shying away from using an IDE for all
this? Seems like you're creating a lot of extra work for yourself.

I create all my Asp.Net pages in DW and don't really like Code-Behind pages.
I prefer having my code and html in the same page. This, of course, is not
preferred to many people. Obviously, not those using VS to design their
pages as you have no choice there. But in VS 25005, this is all changing.
So I am looking forward to this.

The only reason I am not doing the dll's using VS yet, is that I have not
used it much and can do it quicker by hand. Although I am sure it would be
faster using VS if I used it more.

But, if I understand you correctly, I would still have to move the dll to
the another bin directory even if using VS.

Thanks,

Tom
 
J

jasonkester

In VS.NET, you'd have a solution containing three projects: One web
project, one shared class library project, and the third project that
you're looking to add. You'd add a reference to the shared project
from each of the others, and find fresh .dlls waiting in the right
places every time you compile.

And, of course, you have never been required to use codebehinds for
your .aspx files in VS.NET. Curious you came away with that
misconception, since much of the available sample code is written this
way.

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
 
T

tshad

jasonkester said:
In VS.NET, you'd have a solution containing three projects: One web
project, one shared class library project, and the third project that
you're looking to add. You'd add a reference to the shared project
from each of the others, and find fresh .dlls waiting in the right
places every time you compile.

And, of course, you have never been required to use codebehinds for
your .aspx files in VS.NET. Curious you came away with that
misconception, since much of the available sample code is written this
way.

This is what I had heard from others (as well as one or two of the books I
had read)

I know that if I create a new Project, it automatically creates both files
..aspx and .aspx.cs or .aspx.vb.

I was under the impression (maybe mistakenly so) that you had to have both
pages

Also, you had to load Frontpage extensions, which I also didn't want to have
to do (which 2005 apparently does away with).

Tom
 
T

tshad

OK.

I did move one of my .dlls into VS and it compiled fine.

Is there a way to tell it to move the .dll to each of my Web Apps bin
folders?

Thanks,

Tom
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top