• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

Layered Architecture. Installing multiple instances of the business and data layers.

Hi

I've inherited a web application that uses a layered architecture.  The idea behind the system appears to be sound with the business logic being separated from the website processing using COM components registered on the web server etc.

The application has a website which uses a number of methods exposed in a business logic layer.  The business logic layer then passes requests to the Data Access Layer which contacts the database and returns results accordingly.

All this works fine!

The problem is when I want to run two of these systems on the same box.  The COM components are installed on a per web server basis and are registered in the GAC.  The components store the relevant connection to the database.  I am therefore stuck with only having one of these web applications per web server.

What I want to be able to do is install several copies of this application, using different web sites on the same server going to different databases.  With the current design, this isn't possible.

How should I go about achieving this?

Thanks
Simon.
0
sbennetts
Asked:
sbennetts
  • 4
  • 3
1 Solution
 
NipNFriar_TuckCommented:
Actually, if you open up the com components and remove the connection string making the component more generic this could still work.  What you would then do is set up the connection string in the web.config file and pass the connection string into the com component.

HTH
0
 
sbennettsAuthor Commented:
How does that affect the security of the system?
0
 
NipNFriar_TuckCommented:
the web.config file is not viewable from the web.  Where the security would be compromised is if people have direct access to the web server.  If this is a problem you would use a shaw encryption on the connection string, store the encrypted connection string in the web.config and in your code unencrypt the string before sending it to your com object.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
sbennettsAuthor Commented:
Or presumably I could send the encrypted connection string to the COM object and get it to decrypt before using...?
0
 
NipNFriar_TuckCommented:
That is certainly an option, you may even check your database and see if it can accept an encrypted string.  

Another way to go that will take a little more work is to setup a secure table that holds all the connection string that is keyed on say application and website.  The com object would have the connection hard coded to this secure table and all you would pass in is the application and website.  Then the com object would look up the connection string and create a new connection.  The advantage of doing it this way is that all the strings are in a central location makeing it easier to manage them also they are stored in a secure table so having access to the computer is not enough to get at them.

HTH
0
 
sbennettsAuthor Commented:
Some further information.  The web application is based around ASP and NOT ASP.NET.

The connection string appears to be encrypted and stored somewhere (don't know where!) during a custom installation application.

I've tried to make some minor changes to the namespace of the component that gets registered.

I've also looked at the possibility of installing these as library applications as opposed to server applications, all to no avail, I don't really know where to go with it.

Is there anyone out there that can help?

Thanks
Simon
0
 
sbennettsAuthor Commented:
I want to award half the points for the following question:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21406044.html
NipNFriar_Tuck to for help and support.  Whilst the answers have not provided a solution or answer, I would like to thank NipNFriar_Tuck for their assitance.

Please refund other half.

Thanks
Simon.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now