|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP classic -> ASP.NET 2.0In classic ASP, I used to keep a constant file that contains site
configuration settings. For example, Const SITE_BACKGROUND_COLOR = "#909090" Const APPLICATION_NAME = "My Financial Site" Const UPLOAD_DIRECOTRY = "C:\uploads\" And then I'll include this constant file in all of my classic ASP pages. From a code maintenance stand-point, if I need to carry site config settings in ASP.NET C#, should I continue to carry a constant file as above? Or is there a better way. Thank you! ASP.NET C# Newbie "Bob" <spamfree@nospam.com> wrote in Web.config.news:ug4j28W8FHA.3504@TK2MSFTNGP11.phx.gbl: > From a code maintenance stand-point, if I need to carry site config > settings in ASP.NET C#, should I continue to carry a constant file as > above? Or is there a better way. -- Stan Kee (spamhoneypot@rogers.com) On a related note....
I am writing a web application that I intend to host for several clients. The idea is that I will have one folder containing all the code and a separate web site for each client all using the same physical folder as the home directory. Each client will have their own SQL Server database and the idea is that I'll know which DB to connect to based upon the Request.ApplicationPath value. What I'm not sure about is how to use the web.config file to contain information that is web-site specific, e.g. if Client = A, use DB = A, if client = B, use DB = B etc. Is web.config where I should be storing this sort of information? Griff How about mapping USER/Client login with a DB Mapping?
When the user logs in, they use a "Standard Login ID" to connect to a "ADMINDB", from this "Admin DB" you get the DB name (for that user) they are supposed to use starting then, you can then stored this DB name as part of session variable Also ensure you give bare minimum permission to this "Standard Login ID" for that User<---->DB mapping table. Griff wrote: Show quoteHide quote > On a related note.... > > I am writing a web application that I intend to host for several clients. > > The idea is that I will have one folder containing all the code and a > separate web site for each client all using the same physical folder as the > home directory. > > Each client will have their own SQL Server database and the idea is that > I'll know which DB to connect to based upon the Request.ApplicationPath > value. > > What I'm not sure about is how to use the web.config file to contain > information that is web-site specific, e.g. if Client = A, use DB = A, if > client = B, use DB = B etc. > > Is web.config where I should be storing this sort of information? > > Griff
Other interesting topics
How to add a small HTML table under a row of a GridView
Application["TotalPlayings"]++ doesn't work Source Control Products??? Downloading file from database how load one frame before another in aspx page Problem Running ASP.NET/ASP App Under VS 2005 The server tag is not well formed specifying a query string in an href dynamically Disabling Link Button Column in Datagrid Connecting to Active Directory through ASP.NET Web form |
|||||||||||||||||||||||