By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,278 Members | 1,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,278 IT Pros & Developers. It's quick & easy.

Simple question on web.config files

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
Oh, OK. Thanks for that John.

You've been a big help

Kindest Regards

Simon
Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.