Configuration / ASP.NET Configuration Files pt. 2
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
Welcome to Part 2 of ASP.NET configuration files. Let me start by just recapping what we talked about in Part 1. I can have multiple web applications on a single Web server and all nested folders in each application automatically inherit the settings in the Web.Config file in that main root folder we call it in an ASP.NET web application. We can add more folders to our web application and we can add more Web.Config files into each new folder and in this situation we've added a second Web.Config file inside this folder. Now, notice, this one is inside this one and this one right here is inside this one so this is a child of this one and this is a child of this one. Web.Config settings will override anything that cascades down from this one. Let's talk about the cool things about these configuration files. The big advantages of these things: first of all they are never locked. You can always make changes to the config files so you're not in a situation any more in ASP.NET, hadn't been for a while now. You don't have to stop the application or take down the Web server to make changes. What's going to happen if I go into my Web.Config file, make adjustments to it, the people who are currently connected to the website and working will see the old connections, everything is going to run normal for them but the next time a new connection is made, the website is going to be affected by those changes. The next thing and this is one of the big ones, or the other big ones I guess I should say, these Web.Config files can be changed remotely by administrators so possible to connect to the Web server, go in, make changes to that website and this is the big one, we can easily copy these things. Now thing about a web farm where you may have five or six web servers and you need all of the applications on these servers to be configured identically. You get the settings you want on one and then you can simply copy that Web.Config file to the other servers and you have that identical configuration at that point. There's a lot of things cool about these configuration files. Now, I would strongly recommend that if you really want to your chops up on ASP.NET, get out there on the website, on Microsoft's website or go ahead to the book stores, go to the book store sites, Amazon's, Barnes and Noble's, Borders and all those. Find some books on these ASP.NET configuration files. There's not many but you can find some information. Now, there's some excellent chapters in some of the books that are out there. Go read these things. There's a lot of magic in these configuration files. The last cool thing I want to talk about on them is they're very easy to edit; means you have to know what to put there but there's so many sources, you have to put the right information in the right place and it is case sensitive. Be careful with that. But it is easy to edit, just like editing a text file or a Word document. And it's extremely easy to understand because this XML format is human readable. We're not dealing with the old IMI files or any of the cryptic stuff. If you can open it and if you can read anyway, then you can read these configuration files and figure out what's going on. The ASP.NET configuration files are key to making your web application behave, do what it's supposed to and provide a lot of security functionality. Now, we will revisit these configuration files when we talk about, for example, session state management, we talk about various security things, data access, I'll show you how to store your data connection strings, your database connection string into the ASP.NET configuration file, how to store various pieces of data out there and then read it back programmatically. A lot of cool things can happen with the configuration files so make sure that you familiarize yourself with these things and go out and do some reading on them and really develop your understanding on this. It can really help you out in your ASP.NET web application development.
Tutorial Information
| Course: | Microsoft ASP.NET 3.5 |
| Author: | Mark Long |
| SKU: | 34102 |
| ISBN: | 1-93633412-7 |
| Release Date: | 2010-03-24 |
| Duration: | 6 hrs / 69 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 