Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 12th, 2004, 03:59 AM
Authorized User
Join Date: May 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic connection string from ASP


   We put the connection string in Web.config file and invoking the connection string using this System.Configuration.ConfigurationSettings.AppSett ings.Get("DSN")
in ASP.Net.


        <add key="DSN" value="workstation id=APLNSERVER;packet size=4096;user id=sam;data source=APLNSERVER;persist security info=True;initial catalog=AHDB;password=nicuser"></add>
        <add key="DSN_ASP" value="DRIVER={SQL Server};SERVER=aplnserver;UID=nicuser;PWD=nicadmin ;DATABASE=AHDB"></add>

 Is it possible to access the web.config file from AsP page?

Because In the ASP.net application contains Asp page, from that

Asp page we connect the database using connection string as directly. but actually want to access it as dynamically.

With regards
Old July 12th, 2004, 04:19 AM
Friend of Wrox
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi

Cross post at


Dear T.Jayaraj. dont do this !

cheers (:_:)

Love is the most beautiful thing of this world. So do this !

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection String error in ASP picky Classic ASP Databases 1 October 19th, 2007 07:37 AM
ASP connection string not working codehappy Classic ASP Basics 2 May 18th, 2005 08:43 AM
Dynamic Connection Sting from ASP jayaraj ASP.NET 1.0 and 1.1 Professional 1 July 12th, 2004 07:49 AM
Dynamic connection string from ASP page jayaraj Classic ASP Databases 2 July 12th, 2004 07:44 AM
Setting Dynamic Connection String jayaraj General .NET 1 July 9th, 2004 08:19 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.