473,386 Members | 1,790 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,386 software developers and data experts.

A first time in an ASP.NET application.

Hello All,
I've run into something I've never had to worry about in all the asp.net
applications I've created so far. Up until now every database application
I've created has had database username/password info compiled right into the
app. Not the best way to do it but it fit the requirements since special
database users where created just for each of the apps.

However, now I have an application that is going to be sold to other
companies and this method isn't going to work for me. I need to have that
username / password / server info stored in a different location so it can be
modified by a configuration aspx page. I'm storing all other config setting
IN the database. But where would be the best place to store the database info
so it to can be easily modified? Even if it's like the old asp.net system
where the global.asa file was plain text and it could be store in there and
edited by hand would be ok.

Thanks a lot!

Regards,
-Tony
Nov 19 '05 #1
2 951
If you are using ASP.NET 2.0, you can use the built in configuration
system to read, write, and encrypt configuration settings.

I have an article on the features here:
http://odetocode.com/Articles/418.aspx
In 1.x you can still easily read the web.config file, but it's a
little more difficult to write. You'll need to manipulate the XML
yourself (like with the XmlDocument class), and your application will
restart if web.config changes.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Fri, 7 Oct 2005 07:29:04 -0700, "Tony"
<To**@discussions.microsoft.com> wrote:
Hello All,
I've run into something I've never had to worry about in all the asp.net
applications I've created so far. Up until now every database application
I've created has had database username/password info compiled right into the
app. Not the best way to do it but it fit the requirements since special
database users where created just for each of the apps.

However, now I have an application that is going to be sold to other
companies and this method isn't going to work for me. I need to have that
username / password / server info stored in a different location so it can be
modified by a configuration aspx page. I'm storing all other config setting
IN the database. But where would be the best place to store the database info
so it to can be easily modified? Even if it's like the old asp.net system
where the global.asa file was plain text and it could be store in there and
edited by hand would be ok.

Thanks a lot!

Regards,
-Tony


Nov 19 '05 #2

WEB.CONFIG file

"Tony" wrote:
Hello All,
I've run into something I've never had to worry about in all the asp.net
applications I've created so far. Up until now every database application
I've created has had database username/password info compiled right into the
app. Not the best way to do it but it fit the requirements since special
database users where created just for each of the apps.

However, now I have an application that is going to be sold to other
companies and this method isn't going to work for me. I need to have that
username / password / server info stored in a different location so it can be
modified by a configuration aspx page. I'm storing all other config setting
IN the database. But where would be the best place to store the database info
so it to can be easily modified? Even if it's like the old asp.net system
where the global.asa file was plain text and it could be store in there and
edited by hand would be ok.

Thanks a lot!

Regards,
-Tony

Nov 19 '05 #3

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

Similar topics

19
by: DotNetIsHorrible | last post by:
I write CRUD database applications for a living for an audience of about 100 users per application using classic ASP. I maintain and frequently change on user's request 22 different applications...
2
by: Slide-O-Mix | last post by:
I am using the Process class to run an external application from my application. The first time I call the .Start() method it takes several seconds for the process to actually start. Subsequent...
11
by: Marek | last post by:
What can I do in order to avoid first exception pause? I am sure everyone already experienced this behavior and there must be a solution. regards
6
by: Mark Broadbent | last post by:
this might sound like an obvious question but I have found that usually these two evolve at the same time. One of the biggest reasons for creating the abstraction in the first place (in my...
11
by: Jason | last post by:
Hi I have a "problem" i have got a ASP.NET application. in this application i have included logging. in the logging i have logged how many seconds it takes for this application to fully load....
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
17
by: Timothy.Rybak | last post by:
Hello all, This is my first attempt at an application, so kid gloves are appreciated. I need to make a very simple form that only has a few elements. One is TraceCode - a text field that is...
9
by: SAL | last post by:
I have an ASP.NET 2.0 app that takes about 17 seconds to load on first startup but then is very fast after that. As I understand it from some posts in June, this is caused by the loading of the App...
2
by: =?Utf-8?B?SmltIE93ZW4=?= | last post by:
Hi John, Hopefully this post will find its way back to you - or perhaps be answered by someone else. As I mentioned in my last post on the earlier portion of this thread, changing the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.