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

Using Web.Config for Legacy .ASP to get A Connection String

I have a mixed ASP.NET and legacy ASP application.

Right now, the .ASP pages use a mix of Hard Coded connection strings and an
"Global Included" file. I would like to use the connection string in the
Web.Config for all the Legacy .Asp pages.

Anyone know of a good way to do this? Here is a snip of my Web.Config (from
one system).

I thought about doing a simple text search on "DataConnectionString" and
pulling the "Value", but I thought there may be a better way?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dataconnectstring" value="user id=ID;password=Pass;initial
catalog=cat;data source=source;pooling='false'" />
Nov 21 '05 #1
1 1588
use the com based xml libray and an xpath to read it.

-- bruce (sqlwork.com)

"gregory_may" <None> wrote in message
news:OF**************@tk2msftngp13.phx.gbl...
I have a mixed ASP.NET and legacy ASP application.

Right now, the .ASP pages use a mix of Hard Coded connection strings and
an "Global Included" file. I would like to use the connection string in
the Web.Config for all the Legacy .Asp pages.

Anyone know of a good way to do this? Here is a snip of my Web.Config
(from one system).

I thought about doing a simple text search on "DataConnectionString" and
pulling the "Value", but I thought there may be a better way?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dataconnectstring" value="user id=ID;password=Pass;initial
catalog=cat;data source=source;pooling='false'" />

Nov 21 '05 #2

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

Similar topics

1
by: GrantS | last post by:
I am unable to get the connection to work with using the app.config file. the connection works when I use 'in line' connection as below:...
12
by: Charlie | last post by:
Hi: My host will not allow me use a trusted connection or make registry setting, so I'm stuck trying find a way to hide connection string which will be stored in web.config file. If I encrypt...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
13
by: JIM.H. | last post by:
Hello, I have the following lines to read connection string from web.config; string cStr = ConfigurationSettings.AppSettings; SqlConnection sqlConn = new SqlConnection(cStr);...
12
by: Ben | last post by:
I have a group of settings that I'd like to have inherited by multiple sites. I'm trying this, but it's not working. wwwroot\group\web.config wwwroot\group\site1\web.config...
2
by: JoeSep | last post by:
Hi! Is it correct/safe to define a connection pool in the string "sqlConnectionString" of the "sessionState" section of Web.config? - The application is developed using AspNet 1.1 in a Windows...
10
by: eagle | last post by:
I have a web.config in my application that contains the connection strings to all my datasources. I want to move these connection strings to another web config up the folder hierarchy so that all...
2
by: Johnson | last post by:
I'm trying to fix a "sub optimal" situation with respect to connection string management. Your thoughtful responses will be appreciated. I just started with a new client who has a bunch of legacy...
12
lifeisgreat20009
by: lifeisgreat20009 | last post by:
I am a newbie to Struts and JSP...I have been working on the code below for 5 hours now..I googled a lot but couldn't get much help so finally I am here.. Hoping of getting my problem solved. Please...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.