A few questions about web.comfig in ASP.Net

Posted on 2003-03-02
Medium Priority
Last Modified: 2012-05-04
Hi Experts,

A few simple questions about web.comfig in ASP.Net:

1. I put a web.config file, an aspx page and some asp pages in the same site. Will the config affect the asp pages at all?
2. Instead put the web.config file in the root, I put the web.config in a folder, will the config scope be limited in the folder?
3. I only got one aspx page, how can I put the config inside the page?

Thank you in advance.
Question by:johnwood
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

sillycorn earned 300 total points
ID: 8052592
1. No, web.config files is only affected .NET defaullt configuration.
2. I think I must show you in example. Let's say you have the IIS running with default c:\inetpub dir. And let's assume that you create the web.config files in your [test] virtual directory (c:\inetpub\wwwroot\test], then it not just affected files in test directory, but also sub-dir in the test directory. Clear now?
3. No, you cannot place/integrate/add the web.config's contain in the .aspx files. Coz web.config files is xml based, cant be downloaded/open using browser (not sure, but almost available book said so, I just take the words from them) and not server side language.

FYI, use or not using web.config files is a relative question, coz if you are not changing any default .net configuration, then you dont need it. In the other hand, if you change the configuration, then you need it.

Hope it helps,

Featured Post

Stack Overflow Podcast - Developer Story

Welcome to the Stack Overflow podcast recorded Thursday July 20 at Stack Overflow Headquearters in NYC. Your hosts today are podcast regulars Jay Hanlon, David Fullerton, and Ilana Yitzhaki, plus the quite irregular Matt Sherman (Stack Overflow Engineering Manager extraordinaire)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question