473,320 Members | 2,107 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,320 software developers and data experts.

Store a ConnectionString

I have to store a connection string to a data base but I don't know where.
Where do you prefer store it, in a text file or in a xml file?

Thank you.
Nov 16 '05 #1
4 2429
How about using the application configuration file (yourapp.exe.config)? Its
an XML file actually.

For more info:
http://msdn.microsoft.com/library/de...ationfiles.asp
"Alberto" <al*****@nospam.es> wrote in message
news:OY**************@TK2MSFTNGP12.phx.gbl...
I have to store a connection string to a data base but I don't know where.
Where do you prefer store it, in a text file or in a xml file?

Thank you.

Nov 16 '05 #2
Hi Alberto,

Adding on to Shiva, if your connection string contains passwords, consider
ecrypting it and then storing.

HTH,
Rakesh Rajan

"Alberto" wrote:
I have to store a connection string to a data base but I don't know where.
Where do you prefer store it, in a text file or in a xml file?

Thank you.

Nov 16 '05 #3
And if you are particularly worried about security, take a look at the
functionality of dpapi which can store encrypted data based on the
credentials of the logged on user.

Chris.

"Rakesh Rajan" wrote:
Hi Alberto,

Adding on to Shiva, if your connection string contains passwords, consider
ecrypting it and then storing.

HTH,
Rakesh Rajan

"Alberto" wrote:
I have to store a connection string to a data base but I don't know where.
Where do you prefer store it, in a text file or in a xml file?

Thank you.

Nov 16 '05 #4
Microsoft makes available for download a free tool that will encrypt a
connection string, or user credentials, and store it in the registry for use
by the application. Very helpful, especially if you are using windows auth
for sql connections. google 'aspnet_setreg'

--- Nick

"Chris Ballard" <Ch**********@discussions.microsoft.com> wrote in message
news:38**********************************@microsof t.com...
And if you are particularly worried about security, take a look at the
functionality of dpapi which can store encrypted data based on the
credentials of the logged on user.

Chris.

"Rakesh Rajan" wrote:
Hi Alberto,

Adding on to Shiva, if your connection string contains passwords, consider ecrypting it and then storing.

HTH,
Rakesh Rajan

"Alberto" wrote:
I have to store a connection string to a data base but I don't know where. Where do you prefer store it, in a text file or in a xml file?

Thank you.

Nov 16 '05 #5

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

Similar topics

1
by: Stephen Witter | last post by:
I have a asp.net page that creates controls at runtime. I am also wanting to create drop down lists at runtime that connect to a view in sql server. I was thinking of storing either the view name...
0
by: Mark | last post by:
I'm trying to port the asp.net unleashed sample store from SQLServer to Access. I have it all do, execpt when I try and add something to the cart I geet this error: Exception Details:...
6
by: Perin | last post by:
Hi, I am using SQL Server as a Database in my ASP.NET application. Can anyone tell me, how to store my connection string in web.config file and access it from my application. It is very urgent...
6
by: ad | last post by:
We usually store the connection string of Web Applicaiton in Web.Config. Now I want to develop WinForm Application. Where is the better place to store the conneciton string?
1
by: ABC | last post by:
I don't know why. I have a solution which has many projects includes DAL, BLL, componets, etc. Under DAL, it access OpenExeConfiguration to gather connectionstring (It access aspnet.mdb, but my...
3
by: Jim Andersen | last post by:
Hi, I would appreciate if someone could explain this behaviour, and maybe offer a better solution. I have been working with the GridView control. And SqlDataSource. It works great if I do:...
1
by: VB Programmer | last post by:
Asp.net 2.0... I have an SqlDataSource on my aspx form. It's defined as... <asp:SqlDataSource ID="sdsCoupons" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"...
10
by: Brett Romero | last post by:
I'd like to store something such as the following the my app.config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="DEBUG" value="true"/> <add...
0
by: seep | last post by:
salam to everyone.. as a new bee in .net i m finding lot of difficulty. i want to get all records of a table from database via store procedure.but spending many days i dont know how can i do...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...

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.