Simple question on web.config files

  • Thread starter Thread starter John Timney \(Microsoft MVP\)
  • Start date Start date
J

John Timney \(Microsoft MVP\)

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>
 
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
 
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
 
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>
 
Back
Top