473,785 Members | 3,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1259
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@micro softs_free_emai l_service.com> wrote in message
news:#D******** ******@TK2MSFTN GP09.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@micro softs_free_emai l_service.com> wrote in message news:#D******** ******@TK2MSFTN GP09.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@micro softs_free_emai l_service.com> wrote in message
news:e9******** *****@TK2MSFTNG P10.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@micro softs_free_emai l_service.com> wrote in

message
news:#D******** ******@TK2MSFTN GP09.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
3828
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* access config files. This is version 3, which is a big overhaul. It extends ConfigObj to reading config files with sections and various other simplifications. I find ConfigObj extremely easy to use and use it for reading config files and data...
22
3018
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 files, which in turn could be simply and easily maintained with notepad. I understand the benefits of XML, really, but in the case of configuration files it seems it is almost always nothing more than unnecessary complexity, both in accessing them...
6
297
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 to the FTP located in our hosting location. The first time it was a full-upload of the project files, and a minor change to the Web.Config in order to access the right databse. But now, if i make a MINOR change to a code-behind file, how do i...
4
10574
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 application so that users who try to access a page in the application, get redirected to login.aspx where they have to sign in. (And the "signing in" is handled in the codebehind page of
1
2570
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 application. I built a .NET driver program to test this, NetBrokerDriver and provided a NetBrokerDriver.exe.config file which specifies the following: <messaging> <maxRequestLength>-1</maxRequestLength> </messaging>
20
2624
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 a long time ago: YOU DON'T NEED CONFIG FILES FOR PYTHON. why re-invent stuff and parse text by yourself, why the interpreter can do it for you? and anyway, i find this a very ugly format:...
1
1809
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 app.config file, in which sequence are the app config files read in? eg What happens if there are trace switches of the same name with different values in those files? Or a the config files local to a VS project/assembly ? If so, they should not...
10
110312
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 it also integrates UPX (Ultimate Packer for eXecutables) into the build process, if you have it installed. It also claims functionality on linux, as a bonus (I didn't test this). I highly recommend the UPX options, and will cover how to get it...
2
1116
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 access. I expect that 99.999% of the time, during the foreseeable future, the database connection parameters will remain unchanged. The only exception that I envision for this would be during testing or debugging. Given all this, I am tempted to...
0
10148
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6740
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.