New to n-tier (C# Web app / ASP.NET 1.1)
- From: "Mr Al" <alan.kirk@xxxxxxxxxxxxxxxxx>
- Date: 10 Sep 2006 05:42:45 -0700
Needing guidance towards the next step. Apologies for the lengthy
description. My question in summary is "how do I call my data access
methods (and return a datatable) once they are in a seperate dll (on a
different machine)?"
Background:
I have an application (helpdesk/FAQ) written in C# and deployed under
IIS6. The "DAL" is simply 2 seperate C# files (one for Oracle and one
for SQL server - the only places in the project where connection to the
database is made), in their own folder within the VS project, therefore
compiled into the one single dll with the rest of the app. This is
deployed on IIS and the connection string / database type is held in
the web.config file (encrypted). It uses mainly "DataTable" to
populate DataGrids etc on the aspx web pages. When database updates
are required the DAL methods are passed an object array and gets the
schema from the database to create the correct parameters for the sql
update command. All good and well... however...
Question:
I now need to impliment a 3-tier architecture where the aspx pages
will stay on the web server but the DAL must be extracted to a seperate
dll which will be placed on an application server (behind a firewall).
So the structure will be
web server ----| firewall |---- application server ----- database
I have read a lot of the theory of n-tier but have never put this
into practice and Im worried Im missing something fundamental. Do I
have to use either a web service or remoting or is there a simplier
method? My app uploads file from the browser into the database so Im
worried about doing that via a web service.... Does the application
server have to have IIS running so that I can deploy my DLL and place
my connection string in the web.config file? I presume it must if I
do require a web service. I'm assuming that I need a second project
in Visual Studio so I can create a second DLL which will be the DAL.dll
- but I dont know how to call my data access methods once they are in
a seperate dll (on a different machine)
I only have experience of creating web apps that connect direct from
the web server to the database server (and now I want to mend my ways
and become a better person :) ...so I want to make sure I go the
right way now. Any advice, links to further reading, actual code
examples, general reassurance that this isnt going to be a complete
nightmare :) would be greatly appreciated! .
Thanks,
Alan Kirk
Glasgow,
Scotland.
(ps - I know VS2005 (.Net 2.0) will create the strongly typed xsd
files for me for each table but I dont really want to have to scrap the
data access methods I already have working, just find out how to call
them & return my datatable from a seperate machine)
.
- Follow-Ups:
- Re: New to n-tier (C# Web app / ASP.NET 1.1)
- From: rmamedov@xxxxxxx
- Re: New to n-tier (C# Web app / ASP.NET 1.1)
- From: dkode
- Re: New to n-tier (C# Web app / ASP.NET 1.1)
- Prev by Date: Re: Help with Web Services vs Remoting: a specific case
- Next by Date: Distributed app from set up and deployment project
- Previous by thread: Re: Help with Web Services vs Remoting: a specific case
- Next by thread: Re: New to n-tier (C# Web app / ASP.NET 1.1)
- Index(es):
Relevant Pages
|