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

not 'getting' asp.net 2.0's web configuration tool

I haven't made it very far into my first 2.0 project.

In the past, to connect to a DB, I'd store the connection string in
web.config and just grab it from my codebehind page:

connectionString = ConfigurationSettings.AppSettings("dbConnection")

Well, 2.0 is telling me that is deprecated. And via some googling, it seems
like I'm not even supposed to be touchiing the web config file much anymore
and using the whole Website Configuration Wizard.

Can anyone explain how this new concept works? Where do I now stick my db
connection string and how to I access it? Where is it stored? It also talks
about roles/permissions in the Conciguration wizard. Does that refer to
users of the application I'm building? Do I no longer create my own forms/db
tables to maintain users with admin login priviliges?

-Darrel
Apr 12 '06 #1
4 1328
You're not obligated to use the tool. If you add your own configuration
elements, the wizard will pick them up the next time you run it.

Here are some examples and links that should get you going:

Access:

<configuration>
<appSettings/>
<connectionStrings>
<add name="blrpConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0 ;Data
Source=|DataDirectory|\blrp.mdb;Persist Security Info=True"
providerName="System.Data.OleDb"/>
</connectionStrings>
<system.web>
SQLExpress
<connectionStrings>
<add
name="LocalSqlServer"
connectionString="data source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspn etdb.mdf;User
Instance=true"
providerName="System.Data.SqlClient"
/>
</connectionStrings>
Storing and Retrieving Connection Strings

http://msdn2.microsoft.com/en-us/lib...94(VS.80).aspx

"Darrel" <no*****@nospam.com> wrote in message
news:OI**************@TK2MSFTNGP02.phx.gbl...
I haven't made it very far into my first 2.0 project.

In the past, to connect to a DB, I'd store the connection string in
web.config and just grab it from my codebehind page:

connectionString = ConfigurationSettings.AppSettings("dbConnection")

Well, 2.0 is telling me that is deprecated. And via some googling, it
seems like I'm not even supposed to be touchiing the web config file much
anymore and using the whole Website Configuration Wizard.

Can anyone explain how this new concept works? Where do I now stick my db
connection string and how to I access it? Where is it stored? It also
talks about roles/permissions in the Conciguration wizard. Does that refer
to users of the application I'm building? Do I no longer create my own
forms/db tables to maintain users with admin login priviliges?

-Darrel

Apr 12 '06 #2
You're not obligated to use the tool. If you add your own configuration
elements, the wizard will pick them up the next time you run it.

Here are some examples and links that should get you going:


Thanks, Ken! That was simple once I knew. You'd think that if VS.net can
tell you something is deprecated, it could also give you a hit as to what to
replace it with ;o)

I noticed that my DB connection string is now considered a
ConnectionStringSettings but not a 'string'. Can I still pass a
ConnectionString Setting when using DB calls as a string? (Of course, I
realize that DB connections are now written differently in 2.0 so maybe
that'll make sense when I tackle that next...)

-Darrel
Apr 12 '06 #3
try something like this when you first get your connectionstring from your
web.config

Dim connectionStrings As _
ConnectionStringSettingsCollection = _
ConfigurationManager.ConnectionStrings

Dim myConnString As String =
connectionStrings("yourconnectionstringname").Conn ectionString
then pass myConnString to whatever subs or functions you need

hope that makes sense
"Darrel" wrote:
You're not obligated to use the tool. If you add your own configuration
elements, the wizard will pick them up the next time you run it.

Here are some examples and links that should get you going:


Thanks, Ken! That was simple once I knew. You'd think that if VS.net can
tell you something is deprecated, it could also give you a hit as to what to
replace it with ;o)

I noticed that my DB connection string is now considered a
ConnectionStringSettings but not a 'string'. Can I still pass a
ConnectionString Setting when using DB calls as a string? (Of course, I
realize that DB connections are now written differently in 2.0 so maybe
that'll make sense when I tackle that next...)

-Darrel

Apr 12 '06 #4
On Wed, 12 Apr 2006 08:27:57 -0500, Darrel wrote:
Thanks, Ken! That was simple once I knew. You'd think that if VS.net can
tell you something is deprecated, it could also give you a hit as to what to
replace it with ;o)
Normally you would use the wizard to create the connections string. When
you drop a SqlDataSource onto your form, you can then click the wizards and
it will create the string for you.
I noticed that my DB connection string is now considered a
ConnectionStringSettings but not a 'string'. Can I still pass a
ConnectionString Setting when using DB calls as a string? (Of course, I
realize that DB connections are now written differently in 2.0 so maybe
that'll make sense when I tackle that next...)


..ToString() is your friend.
Apr 12 '06 #5

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

Similar topics

0
by: Namratha Shah \(Nasha\) | last post by:
Hi All, We have almost covered all the .NET Framework Tools except a few, which we will cover in the coming days. Today we will are going to check out a tool called as mscorcfg.msc. This is a...
4
by: Steven Ramacher | last post by:
I am having a little issue with VS 2005. I am trying to use the ASP.NET configuration manager and have not had any success launching the application. No matter what I do I get an error message that...
0
by: te goody | last post by:
Problem summary: Web Site Admin Tool is not generating the application services database (aspnetdb.mdf) in a SS 2005 only environment; i.e. The DB is not found under the app_data directory. The...
7
by: Steven Cliff | last post by:
I have started to use the new Enterprise Library (Jan 06) and have set up a skeleton project using the DAAB. This all seems to work fine apart from when I come to secure the app.config file via...
0
by: crackajaxx | last post by:
I've hunted for a while so I'm hoping someone can shed some light on this problem for me. I have an application (not a web-app, in fact this is an installed service) that relies upon its...
4
by: SAL | last post by:
I'm trying to use the website configuration tool and it keeps telling me that it is unable to connect the SQL Server Database. I do not have SQL Server Express installed. I have the real deal...
1
by: =?Utf-8?B?RGVubmlzIE1jQ2FydGh5?= | last post by:
I am trying to add users to the default ASP.NET membership provider (SQL Express) using the ASP.NET Configuration Tool. When I launch the ASP.NET Configuration Tool from the Web Site menu in...
6
by: Jonathan Wood | last post by:
The ASP.NET Configuration tool is great for quickly managing users in the database on my development machine. However, I don't see a way to use it to access the database on my Web server. Is...
3
by: Robert Kochem | last post by:
Hi, I have some problems locating .NET Framework Configuration Tool for configuring an snk as fully trusted. On the PC I want to do this only the frameworks up to 3.5 were installed therefore I...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.