473,651 Members | 2,790 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:

connectionStrin g = ConfigurationSe ttings.AppSetti ngs("dbConnecti on")

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 1334
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:

<configuratio n>
<appSettings/>
<connectionStri ngs>
<add name="blrpConne ctionString"
connectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0;Data
Source=|DataDir ectory|\blrp.md b;Persist Security Info=True"
providerName="S ystem.Data.OleD b"/>
</connectionStrin gs>
<system.web>
SQLExpress
<connectionStri ngs>
<add
name="LocalSqlS erver"
connectionStrin g="data source=.\SQLEXP RESS;Integrated
Security=SSPI;A ttachDBFilename =|DataDirectory |aspnetdb.mdf;U ser
Instance=true"
providerName="S ystem.Data.SqlC lient"
/>
</connectionStrin gs>
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******** ******@TK2MSFTN GP02.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:

connectionStrin g = ConfigurationSe ttings.AppSetti ngs("dbConnecti on")

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
ConnectionStrin gSettings but not a 'string'. Can I still pass a
ConnectionStrin g 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 connectionstrin g from your
web.config

Dim connectionStrin gs As _
ConnectionStrin gSettingsCollec tion = _
ConfigurationMa nager.Connectio nStrings

Dim myConnString As String =
connectionStrin gs("yourconnect ionstringname") .ConnectionStri ng
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
ConnectionStrin gSettings but not a 'string'. Can I still pass a
ConnectionStrin g 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
ConnectionStrin gSettings but not a 'string'. Can I still pass a
ConnectionStrin g 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
1459
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 .Net configuration tool, which allows you to manage .Net Framework GAC, security policies through Microsoft management console. You will fing this tool in
4
410
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 says “Unable to connect to Visual Studio’s Local Host Web Server”, other that that everything seems to be ok. I am running XP 64bit edition of Windows, and the MSDN Build of Visual Studio Professional. -- Steven
0
1878
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 Question: What configuration am I missing to allow WAT to create the application services database? Scenarios I tried:
7
6139
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 encryption. I have encrypted the connectionsettings block in the config file but obviously when I come to deploy the solution to other PC's, it cannot read the block as it doesn't have the keys to decrypt. I understand that as far as ASP.NET...
0
1305
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 application configuration file to provide it with sensitive information. In this case, the application is talking to a website that requires credentials that are not the same as the user that the application runs as (again, its installed as a service).
4
1478
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 installed on my development box. Is this the problem or is there someway to tell this tool that I'm using and named instance of SQL Server. I ran the aspnet_regsql.exe tool and it installed the aspnetdb database in the server. In the...
1
1944
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 Visual Studio, the ASP.NET development server starts, a browser window opens, and the browser displays this error message: "The page cannot be displayed. Cannot find server or DNS error."
6
1560
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 this possible? Thanks. -- Jonathan Wood
3
3861
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 wanted to download the .Net SDK 2.0 - but the download page said that it is outdated , superseded by the "Windows SDK for Windows Server 2008 and .NET Framework 3.5". Therefore I downloaded the WebInstaller and installed all .Net related...
0
8277
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8700
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8581
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7298
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.