FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister  MasterVB.NET
Visual Basic 2005 .NET Forum
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
web.config
 
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Database Programming
View previous topic :: View next topic  
Message
Author
zahra
Newbie
Joined: 06 Jul 2006
Posts: 4

PostPosted: Thu Jul 06, 2006 1:00 pm    
Post subject: web.config
Reply with 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
View user's profile Send private message
Author
zahra
Newbie
Joined: 06 Jul 2006
Posts: 4

PostPosted: Thu Jul 06, 2006 1:00 pm    
Post subject:
Reply with quote


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
View user's profile Send private message
Author
neetu
Newbie
Joined: 07 Jul 2006
Posts: 2

PostPosted: Fri Jul 07, 2006 1:00 am    
Post subject:
Reply with quote

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



 

Back to top
View user's profile Send private message
Author
[ÉË¿Ú]
Newbie
Joined: 05 Jul 2006
Posts: 6

PostPosted: Fri Jul 07, 2006 1:00 am    
Post subject:
Reply with 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


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
View user's profile Send private message
Author
Naresh Kumar
Newbie
Joined: 01 Jul 2006
Posts: 5

PostPosted: Fri Jul 07, 2006 1:00 am    
Post subject:
Reply with 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, [ÉË¿Ú] 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
View user's profile Send private message
Author
AmanSharma
Newbie
Joined: 12 Jul 2006
Posts: 15

PostPosted: Thu Jul 20, 2006 1:00 pm    
Post subject:
Reply with quote
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
View user's profile Send private message
Author
jaya
Newbie
Joined: 23 Jul 2006
Posts: 1

PostPosted: Sun Jul 23, 2006 1:00 am    
Post subject:
Reply with quote


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
View user's profile Send private message
Author
BradleyPeter
Beginner
Joined: 11 Jul 2006
Posts: 150

PostPosted: Sun Jul 23, 2006 1:00 am    
Post subject:
Reply with 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:

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
View user's profile Send private message
Author
Ragia
Newbie
Joined: 15 Jul 2006
Posts: 7

PostPosted: Mon Jul 24, 2006 1:00 pm    
Post subject:
Reply with quote


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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MasterVB.NET Forum Index -> Database Programming All times are GMT
Page 1 of 1

 
Jump to:  
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


Archieve

Powered by phpBB © 2001, 2002 phpBB Group, used in Visual Basic 2005 .NET Forum

| Visual Basic .NET Forum | Online Recipe Archiver | Shareware Freeware PAD | Lowongan Kerja | Kamus Online | Health Supply | Digital Camera Review |
Orang Paling Keren

RSS