473,395 Members | 1,977 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,395 software developers and data experts.

Simple question on web.config files

Hi chaps,

Can someone tell me the following:

If I declare a site wide config file and then want to overide it in a secure
directory, do I need to have a complete config file, or can I just overide
the settings that I want to change from the default.

If I need to have a complete config file, where can I find out the absolute
minimum that I need to put into it. The web.config file that Visual Studio
creates is full of crap that I'd quite like to get rid of if at all
possible.

The reason I ask is that there doesnt seem to be much point in redeclaring
config information (for example an SQLString) if that info is already
declared site wide.

Thanks for any advice you could offer

Kindest Regards

Simon
Nov 18 '05 #1
4 1237
lookup information on the location tag .......... t allows you to specify
info (including security) that applies at named directories (or files) in
your application

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
----------------------------------------------------------------------------
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
----------------------------------------------------------------------------
------------------------------------

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:#D**************@TK2MSFTNGP09.phx.gbl...
Hi chaps,

Can someone tell me the following:

If I declare a site wide config file and then want to overide it in a secure directory, do I need to have a complete config file, or can I just overide
the settings that I want to change from the default.

If I need to have a complete config file, where can I find out the absolute minimum that I need to put into it. The web.config file that Visual Studio
creates is full of crap that I'd quite like to get rid of if at all
possible.

The reason I ask is that there doesnt seem to be much point in redeclaring
config information (for example an SQLString) if that info is already
declared site wide.

Thanks for any advice you could offer

Kindest Regards

Simon

Nov 18 '05 #2
Hi John,

Thanks for your reply. I had thought about using the location tag but I
think I would prefer to use the other way (actually defining a new
web.config file), because this is the way that the developers at my company
have told me to do it and all the literature I have found have suggested
this way.

One reference even seemed to suggest that if you use the location tag, then
the values you define for that location aren't inherited by any sub
directories of the location. I don't know if thats true but either way, if
anyone could advise me on doing it the other way I would be very greatful.

Thanks

:-)
Simon
lookup information on the location tag .......... t allows you to specify
info (including security) that applies at named directories (or files) in
your application

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
-------------------------------------------------------------------------- -- ------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958 Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
-------------------------------------------------------------------------- -- ------------------------------------

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message news:#D**************@TK2MSFTNGP09.phx.gbl...
Hi chaps,

Can someone tell me the following:

If I declare a site wide config file and then want to overide it in a

secure
directory, do I need to have a complete config file, or can I just overide the settings that I want to change from the default.

If I need to have a complete config file, where can I find out the

absolute
minimum that I need to put into it. The web.config file that Visual Studio creates is full of crap that I'd quite like to get rid of if at all
possible.

The reason I ask is that there doesnt seem to be much point in redeclaring config information (for example an SQLString) if that info is already
declared site wide.

Thanks for any advice you could offer

Kindest Regards

Simon


Nov 18 '05 #3
Defining the seperate web.config for your aplication is perfectly
acceptable, although it gives you more files to maintain.

Using location should inherit down to directories below the designated
location in the web.config file - if you add a new web.config below the
named location however it will override.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
----------------------------------------------------------------------------
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C# - ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
----------------------------------------------------------------------------
------------------------------------

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in message
news:e9*************@TK2MSFTNGP10.phx.gbl...
Hi John,

Thanks for your reply. I had thought about using the location tag but I
think I would prefer to use the other way (actually defining a new
web.config file), because this is the way that the developers at my company have told me to do it and all the literature I have found have suggested
this way.

One reference even seemed to suggest that if you use the location tag, then the values you define for that location aren't inherited by any sub
directories of the location. I don't know if thats true but either way, if
anyone could advise me on doing it the other way I would be very greatful.

Thanks

:-)
Simon
lookup information on the location tag .......... t allows you to specify
info (including security) that applies at named directories (or files) in your application

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP


--------------------------------------------------------------------------
--
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547 Professional JSP 2nd Edition - ISBN:

1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>


--------------------------------------------------------------------------
--
------------------------------------

"Simon Harvey" <sh856531@microsofts_free_email_service.com> wrote in

message
news:#D**************@TK2MSFTNGP09.phx.gbl...
Hi chaps,

Can someone tell me the following:

If I declare a site wide config file and then want to overide it in a

secure
directory, do I need to have a complete config file, or can I just

overide the settings that I want to change from the default.

If I need to have a complete config file, where can I find out the

absolute
minimum that I need to put into it. The web.config file that Visual Studio creates is full of crap that I'd quite like to get rid of if at all
possible.

The reason I ask is that there doesnt seem to be much point in redeclaring config information (for example an SQLString) if that info is already
declared site wide.

Thanks for any advice you could offer

Kindest Regards

Simon



Nov 18 '05 #4
Oh, OK. Thanks for that John.

You've been a big help

Kindest Regards

Simon
Nov 18 '05 #5

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

Similar topics

4
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply*...
22
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text...
6
by: Allan Rojas | last post by:
Hi there, i'm having this problem and i hope someone can help me out. We have this WebApplication in ASP.NET; we work on it in our local webserver. When we're done, we must upload the application...
4
by: Bennett Haselton | last post by:
If I add this to my web.config file: <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" /> </authentication> I can configure the...
1
by: Joseph Geretz | last post by:
I need to download a greater than 4 megabyte attachment via WSE / DIME. The only way I know how to configure this is via a .config file. Normally, the ..config file is the same name as the base...
20
by: tomerfiliba | last post by:
hey i've been seeing lots of config-file-readers for python. be it ConfigObj (http://www.voidspace.org.uk/python/configobj.html) or the like. seems like a trend to me. i came to this conclusion...
1
by: herbert | last post by:
In VS.2005 a Windows Service can have an app.config file. A class library can also have an app.config file. Now if my Windows Services uses three class libraries, each of it coming with its own...
10
true911m
by: true911m | last post by:
This is a simple walkthrough to get PyInstaller up and running. I decided to give PI a try, because it claims to be more selective about what it bundles into its executable files by default, and...
2
by: kj | last post by:
I'm sure this is a simple, but recurrent, problem for which I can't hit on a totally satisfactory solution. As an example, suppose that I want write a module X that performs some database...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
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,...

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.