Visual Basic .NET » Database Programming
web.config -- zahra --


Hi group i am a new member here and new in .net toooooooo i have quesion ...how can i use web ,.config to hold database tables infos and connectios so wehn application starts it connect to those defined in web.config ..can i change database every time application start ??
thanks in advance

-- zahra --



Hi all how to use web.config to configer database connection and tables in an application , can i use different database each time I start an application

-- neetu --


yes you can, you need to simply use the appsettings in web.config file

-- [ÉË¿Ú] --

i can't understand your problem?
----- Original Message -----
From: "zahra"
To: "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting"
Sent: Thursday, July 06, 2006 1:26 AM Subject:
web.config

Hi group
i am a new member here and new in .net toooooooo
i have quesion ...how can i use web ,.config to hold database tables
infos and connectios so wehn application starts it connect to those
defined in web.config ..can i change database every time application
start ??
thanks in advance


>

 

-- Naresh Kumar --

Do u mean u want to switch different databases whenever your application starts dynamically?
If yes, this is not possible as for my knowledge.
But we can make this possible if u define specific values into appSettings tag in web.config and call through collections on application start event of Global file.
On 7/6/06,
wrote:

i can't understand your problem?
----- Original Message -----
From: "zahra"
To: "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting"
Sent: Thursday, July 06, 2006 1:26 AM
Subject:
web.config
>
> Hi group
> i am a new member here and new in .net toooooooo
> i have quesion ...how can i use web ,.config to hold database tables
> infos and connectios so wehn application starts it connect to those
> defined in web.config ..can i change database every time application
> start ??
> thanks in advance
>
>
> >
>

 

-- AmanSharma --

Like this:--

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="connStr" value="Provider=sqloledb.1;data source=.....;User Id=...;Password=...;Initial Catalog=..."></add>
<add key="MailServer" value="...."></add>
</appSettings>
On 7/6/06, Naresh Kumar <naresh.inov> wrote:

Do u mean u want to switch different databases whenever your application
starts dynamically?
If yes, this is not possible as for my knowledge.
But we can make this possible if u define specific values into appSettings
tag in web.config and call through collections on application start event
of Global file.
On 7/6/06,
<alexdragonit> wrote:
>
> i can't understand your problem?
>
>
> ----- Original Message -----
> From: "zahra" < ragia.ibrahim>
> To: "DotNetDevelopment, VB.NET <
http://vb.net 
/>,
> ASP.NET <
http://asp.net 
/>, XML, XML Web Services,.NET Remoting" <
> DotNetDevelopment>
> Sent: Thursday, July 06, 2006 1:26 AM
> Subject:
web.config
>
>
> >
> > Hi group
> > i am a new member here and new in .net toooooooo
> > i have quesion ...how can i use web ,.config to hold database tables
> > infos and connectios so wehn application starts it connect to those
> > defined in web.config ..can i change database every time application
> > start ??
> > thanks in advance
> >
> >
> > >
> > >
>
 

-- jaya --



Hai Zahra
There is a solution for ur problem. u will be having web.config.go into it add in configuration
<appSettings>
<add key="ss" value ="user id=xx;password=yyyy ;data source=zzz;initial catalog=Northwind">
</appSettings>
and u can change after u deployed in web.config. it may be username,password,data source or initial catalog.

zahra wrote:

Hi group
i am a new member here and new in .net toooooooo
i have quesion ...how can i use web ,.config to hold database tables
infos and connectios so wehn application starts it connect to those
defined in web.config ..can i change database every time application
start ??
thanks in advance

 

-- BradleyPeter --

Please. Don't ever put unencrypted user information into config files.

The best thing is to use Windows authentication, if that's possible, because that does not involve giving credentials at all. If you can't do that, the next best thing is to store the credentials, encrypted, in machine.config; but this assumes that you can have the same user defined on all your databases and that the same permission sets are required.

If you're really in dire straits then encrypt them before storing them to web.config.

Just my 2c.
Peter

-----Original Message-----
From: DotNetDevelopment on behalf of jaya Sent: Sat 7/22/2006 8:34 AM To: DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting Cc:
Subject:
Re: web.config

Hai Zahra
There is a solution for ur problem. u will be having web.config.go into it add in configuration
<appSettings>
<add key="ss" value ="user id=xx;password=yyyy ;data source=zzz;initial catalog=Northwind">
</appSettings>
and u can change after u deployed in web.config. it may be username,password,data source or initial catalog.

zahra wrote:

Hi group
i am a new member here and new in .net toooooooo
i have quesion ...how can i use web ,.config to hold database tables
infos and connectios so wehn application starts it connect to those
defined in web.config ..can i change database every time application
start ??
thanks in advance



 

-- Ragia --



Bradley, Peter wrote:
Please. Don't ever put unencrypted user information into config files.

The best thing is to use Windows authentication, if that's possible, because that does not involve giving credentials at all. If you can't do that, the next best thing is to store the credentials, encrypted, in machine.config; but this assumes that you can have the same user defined on all your databases and that the same permission sets are required.

If you're really in dire straits then encrypt them before storing them to web.config.

Just my 2c.
Peter

-----Original Message-----
From: DotNetDevelopment on behalf of jaya
Sent: Sat 7/22/2006 8:34 AM
To: DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Cc:
Subject:
Re: web.config

Hai Zahra
There is a solution for ur problem. u will be having web.config.go
into it add in configuration
<appSettings>
<add key="ss" value ="user id=xx;password=yyyy ;data source=zzz;initial
catalog=Northwind">
</appSettings>
and u can change after u deployed in web.config. it may be
username,password,data source or initial catalog.

zahra wrote:

> Hi group
> i am a new member here and new in .net toooooooo
> i have quesion ...how can i use web ,.config to hold database tables
> infos and connectios so wehn application starts it connect to those
> defined in web.config ..can i change database every time application
> start ??
> thanks in advance



------_=_NextPart_001_01C6ADA4.0AAF8F78
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="winmail.dat"
X-Google-AttachSize: 4788

 

[Submit Comment]Home