473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP classic -> ASP.NET 2.0

Bob
In 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


Nov 25 '05 #1
2 1011
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
Nov 25 '05 #2
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:
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


Nov 26 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Simon Wittber | last post by:
I've noticed that a few ASPN cookbook recipes, which are recent additions, use classic classes. I've also noticed classic classes are used in many places in the standard library. I've been...
6
by: Keith | last post by:
I have been using ASP in it's VBScript form for some time, but I only tend to learn what I need to know as I need to know it, so I am by no means an expert and spend a lot of time on here asking...
5
by: Velvet | last post by:
Can someone tell me to what process I need to attach to be able to step through my classic ASP code in VS.net 2003. I'm working on an XP box with IIS installed. I also have VS.net 2005 (The...
6
by: John | last post by:
Hello. I believe I've read somewhere that classic .asp pages will still operate correctly with no problems with the .NET 1.1 framework installed on a Windows 2000 Server server. Does anyone know...
5
by: Kent.Gallinger | last post by:
I have a web application that contains asp.net and classic asp pages. I have a vb.net function that I would like to use in one of the classic asp pages. How can I do this? Can I do this? ...
24
by: MikeR | last post by:
What do y'all see for the future of ASP in light of MS decision to replace FrontPage with a new series of development tools? All of them mention ASP.NET, but no mention of the ASP I love. Mike
11
by: mase | last post by:
I've built a new ASP.NET web app with the CSLA framework. The site runs fine with a small number of users, but once there is any traffic the CPU spikes at 100%. I went through and made many updates...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.