| View previous topic :: View next topic |
| Message |
|
Author
|
zahra
Newbie
|
Joined: 06 Jul 2006
Posts: 4
|
|
Posted: Thu Jul 06, 2006 1:00 pm
Post 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
|
| Back to top |
|
 |
|
Author
|
zahra
Newbie
|
Joined: 06 Jul 2006
Posts: 4
|
|
Posted: Thu Jul 06, 2006 1:00 pm
Post subject: |
|
|
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
|
| Back to top |
|
 |
|
Author
|
neetu
Newbie
|
Joined: 07 Jul 2006
Posts: 2
|
|
Posted: Fri Jul 07, 2006 1:00 am
Post subject: |
|
|
yes you can, you need to simply use the appsettings in web.config file
|
| Back to top |
|
 |
|
Author
|
[ÉË¿Ú]
Newbie
|
Joined: 05 Jul 2006
Posts: 6
|
|
Posted: Fri Jul 07, 2006 1:00 am
Post subject: |
|
|
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: [DotNetDevelopment] web.config
| Quote: |
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
>
|
|
| Back to top |
|
 |
|
Author
|
Naresh Kumar
Newbie
|
Joined: 01 Jul 2006
Posts: 5
|
|
Posted: Fri Jul 07, 2006 1:00 am
Post subject: |
|
|
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:
| Quote: |
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: [DotNetDevelopment] 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
>
>
> >
>
|
|
| Back to top |
|
 |
|
Author
|
AmanSharma
Newbie
|
Joined: 12 Jul 2006
Posts: 15
|
|
Posted: Thu Jul 20, 2006 1:00 pm
Post subject: |
|
|
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:
| Quote: |
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/>, C# .NET, ADO.NET<http://ado.net/>,
> ASP.NET <http://asp.net/>, XML, XML Web Services,.NET Remoting" <
> DotNetDevelopment>
> Sent: Thursday, July 06, 2006 1:26 AM
> Subject: [DotNetDevelopment] 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
> >
> >
> > >
> > >
>
|
|
| Back to top |
|
 |
|
Author
|
jaya
Newbie
|
Joined: 23 Jul 2006
Posts: 1
|
|
Posted: Sun Jul 23, 2006 1:00 am
Post subject: |
|
|
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:
| Quote: |
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
|
|
| Back to top |
|
 |
|
Author
|
BradleyPeter
Beginner
|
Joined: 11 Jul 2006
Posts: 150
|
|
Posted: Sun Jul 23, 2006 1:00 am
Post subject: |
|
|
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: [DotNetDevelopment] 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:
| Quote: |
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
|
|
| Back to top |
|
 |
|
Author
|
Ragia
Newbie
|
Joined: 15 Jul 2006
Posts: 7
|
|
Posted: Mon Jul 24, 2006 1:00 pm
Post subject: |
|
|
Bradley, Peter wrote:
| Quote: |
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: [DotNetDevelopment] 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
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|