How to configure for an SaaS?

How to configure for an SaaS?

Old forum URL: forums.lhotka.net/forums/t/2685.aspx


Jav posted on Thursday, April 12, 2007

I am a little confused about the implementation details of a Web Forms application as an SaaS. 

Each client will have a separate set of DataBases.  Since there is a single web.config in a virtual directory, does that mean that each user ought to have their own separate virtual directory (and hence a separate App installation)?  One can have multiple Application Pools in a virtual directory, but I am not sure if or how that will help with the Connections Strings.

Will appreciate any suggestions.

Jav

dshafer replied on Thursday, April 12, 2007

Jav,

This is actually the first time I've ever heard the term SaaS before, so if my advice is terrible please disregard it.  After reading your thread and an overview of what a SaaS is, it sounds like your concern is how to store the different user's connection strings.  I think I would put a connection string in your web.config for a "master" database that housed information about the user and the name/connection string to his/her database.  Then you could read that information in from this master database and use it to create a connection to the correct user database.  If this is all you are trying to accomplish, I don't think you need to create multiple application pools.  Maybe somebody else can chime in and discuss the possible issues, if there are any, that you may face by using a single application pool.

Dustin

Jav replied on Thursday, April 12, 2007

Dustin,

Your idea has merit.  I suppose the aspnetdb can be extended to include the connectionString information in the user table. One will have to devise a sound way to cache this information in order to avoid a trip to this DB everytime the connection string is needed.  Separation of one user's data from the other is critical for us - hence the need for a foolproof method to keep the two users' connectionStrings from contaminating each other.

Jav

Bayu replied on Friday, April 13, 2007

Hey,

May I suggest you create your own DB for this instead of extending asp's default DB?
If you have a 'dedicated' DB you can independently backup, restore, parallellize, etc it.

Bayu

dshafer replied on Friday, April 13, 2007

Jav,

As Bayu suggested, I would use your own DB as well.  By master I only meant that it be the "central" database, if you will, that would hold your connection/user information to the other user specific databases.  I'm not all that well versed in asp.net as most of my work revolves around WinForms applications, but I think you could store the connection information in a cookie, session, or the like.

Dustin

Jav replied on Friday, April 13, 2007

Chris, Bayu

With the grief that the aspnetdb has caused me in the past six months, I must be a glutton for punishment to be still trying to use it.  I think you are right - it is probably a lot easier to create one's own database and have better control over what it does.  Thanks.

Jav

Copyright (c) Marimer LLC