Monday, May 21, 2007

Overriding Web.config Using Location Tag

Let's say you have a web application with several static configuration settings stored in the <appsettings> collection. Then let's say you want one module of your application to behave differently, i.e. a different set of Application Settings should apply.

Use the <location> tag in web.config to describe the settings for folders within the application.

Web.config Snippet
I have a web application set up in c:\inetpub\myapp, aka http://localhost/myapp. A snippet from web.config is illustrated here:

The application reads settings from the collection by default, unless the request is made to the Test folder.


MyApp Settings

The following screen shot illustrates the default behavior:



Test Settings

And here are the overrides, using the same test page under the /Test folder:
Piece of cake, huh? For the brief testconfig.aspx source code, visit the following link.

27 comments:

Anonymous said...

not clear

Diablo said...

Hmm...did I leave out that the testconfig.aspx source is simply copied to the two locations, rendering different output based on web.config specifications?

If that doesn't clarify, let me know.

Unknown said...

Hi, I am facing a problem with this "location" tag. I have overwritten the authorization section of "System.web" using this tag, for one specific file in current directory.After installation of set of O.S.patches in production this stopped working. Can u give me any idea, why is this happening?

Anonymous said...

I am working with a company that is a server of different sites...Each of those websites are producing a web.config file, which are just the same...somebody suggested to me that I can just configure it in the machine.config of our server...my problem is that I dont know how to do this...can somebody have an idea how can I solve this problem please???

Anonymous said...

http://www.webmonkey.com/tutorial/Charles_dickens_christmas_carol/
http://www.webmonkey.com/tutorial/Online_photo_christmas_card/
celexa and testing methods
[url="http://www.webmonkey.com/tutorial/Great_christmas_present/"]great christmas present[/url]
[http://www.webmonkey.com/tutorial/Mickeys_very_merry_christmas_party_2009/ mickeys very merry christmas party 2009]
[url="http://www.webmonkey.com/tutorial/Online_photo_christmas_card/"]online photo christmas card[/url]
http://www.webmonkey.com/tutorial/Disney_christmas_carol/
[url="http://www.webmonkey.com/tutorial/Personalized_photo_christmas_card/"]personalized photo christmas card[/url]
[http://www.webmonkey.com/tutorial/Vintage_christmas_german_tree_decoration_glass_bow/ vintage christmas german tree decoration glass bow]
[http://www.webmonkey.com/tutorial/Christmas_family_photo_card_idea/ christmas family photo card idea]
looking for tamsulosin hcl inn bangladesh
[http://www.webmonkey.com/tutorial/Wooden_christmas_yard_decoration/ wooden christmas yard decoration]
[url="http://www.testriffic.com/user/Chester1621/"]buy amoxil in Florida [/url]
[http://www.testriffic.com/user/Moses1716/ sildenafil uk only]

hannah said...

I lost a lot of weight by taking Phentermine that I ordered from WWW.MEDSHEAVEN.COM i am very satisfied!

Anonymous said...

It was many years ago we first selected Top Restaurants in the U.S. See it. http://restaurants-us.com/az/Tucson/Oriental%20Express%20Restaurant/85719/

Anonymous said...

I can look for the reference to a site with a large quantity of articles on a theme interesting you.

[url=http://www.graj24.pl]darmowe gry[/url]
| [url=http://www.graj24.pl]darmowe gry[/url]

Anonymous said...

professional answer to this insurance question: Do all states require car insurance? http://insuranceinstates.com/texas/Austin/Farmers%20Insurance%20Group/78750/

Anonymous said...

I've always liked things like sand clocks, lava lamps, and the like to well-wishing of just dish out in days of yore staring at it as a configuration of catharsis. In a opportunity, it helps me with meditation, to mitigate stress and just fantasize just about nothing. That's why since I was a kid, a substitute alternatively of dolls and cars I've in any case at ease more of such pieces like sand clocks, lava lamps, harmonious boxes etc. So I was most charmed when I base the[url=http://www.dealtoworld.com/goods-1260-2-Laser++LED+Light+Show+Laser+Top+Gyroscope+with+Music+Effects.html] 2-Laser + LED Spry Appear Laser Top Gyroscope with Music Effects[/url] from DealtoWorld.com protection the Toys section. It's like a musical box, a spinning better, and a light divulge all rolled into one. Which is spectacular diversion! The gyroscope transfer whirl representing round a minute. The laser enlightenment display with accompanying music makes this gyroscope a measure unique tiny that my friends have also been most amused with.

My dogs are also fair outr?around the laser gyroscope I got from DealtoWorld.com. They evermore follow the gyroscope as it spins, although at first place they kept barking at the laser slight advertise, and also because it produces music. But after they got used it, they've stopped barking but just keep following the gyroscope whenever I start spinning it. Kids are also pretty amused alongside it. Off it's proper to take fun toys throughout the house so that you can leave the diminutive on while the kids are being amused or playing with it while you open to provide for scoff or get changed. The gyroscope is a particular such trinket with this purpose.

The gyroscope I bought from DealtoWorld.com has a dragon as a intent plot on it, and produces a taper accompany with red, dispirited, and unripened colours. Pit oneself against a look at the pictures I've uploaded of the gyroscope with laser light show. The music produced from the gyroscope is not that renowned but decorous plenty to consider any redone visitor to the house. The gyroscope is red and jet-black, making it look exceedingly imperturbable, and measure arrogant with that dragon imprint.

The music light make clear gyroscope runs on 6 LR44 batteries, which are replaceable anyway. I've also used this gyroscope to eye-opener my girlfriend during our anniversary celebration. I did the cheesy thing of decorating the pension latitude with roses and when I led her in, I started up the gyroscope as well so that the laser brighten register produces a fresh effect. I also had some battery operated candles so all the moonlight effects created a rather dreamt-up atmosphere. She loved it, not later than the style, to my relief. I also bought the candles from DealtoWorld.com. These days it seems to be my non-performance shopping put for all gifts and ideas for romantic occasions.

Since Christmas is coming, this laser lamp playing gyroscope can perhaps be a great Christmas gift looking for the toddler or neutral the mollycoddle! Alternatively, the gyroscope can altogether be a gracious addition to the established Christmas decorations. I can imagine placing it adjoining the Christmas tree and perhaps spinning it when guests reach in the house. Looks like [url=http://www.dealtoworld.com]DealtoWorld.com[/url] is getting my function thus far again!

Anonymous said...

top new dating sites http://loveepicentre.com dating service vancover

Anonymous said...

Hello. Facebook takes a [url=http://www.onlineblackjack.gd]no deposit bonus[/url] stake on 888 casino apportion: Facebook is expanding its efforts to introduce real-money gaming to millions of British users after announcing a sell with the online gambling companions 888 Holdings.And Bye.

Anonymous said...

[url=http://loveepicentre.com/map.php][img]http://loveepicentre.com/uploades/photos/3.jpg[/img][/url]
male dating mp3 [url=http://loveepicentre.com/success_stories.php]keanu dating[/url] top 100 dating site list
phone dating mn [url=http://loveepicentre.com/faq.php]dating a non-christian[/url] saga over 50 dating
mother daughter dating issues [url=http://loveepicentre.com/faq.php]100 free singles online dating[/url] tips on dating

Anonymous said...

download ebook adxcellence amazon http://audiobookscollection.co.uk/it/Stumbling-on-Happiness/p28794/ essentials of corporate finance ebook free [url=http://audiobookscollection.co.uk/fr/The-Official-Guide-for-GMAT-Review-12th-Edition/p170475/]ebook reader software sony[/url] rumble fish free ebook

Anonymous said...

the art of war free ebook http://audiobookscollection.co.uk/Practical-Lessons-in-Yoga/p132944/ ebook darkover novels [url=http://audiobookscollection.co.uk/fr/The-Civil-War-A-Narrative-Volume-I/p10539/]books for all ebook[/url] used nook ebook reader

Anonymous said...

sony ebook downloads http://audiobookscollection.co.uk/it/Caffeine-and-Behavior-Current-Views-and-Research-Trends/p225476/ la mecanica del corazon ebook [url=http://audiobookscollection.co.uk/it/Your-Body-How-It-Works-The-Endocryne-System/p117070/]private label ebook cancer[/url] efl ebook alice in wonderland

Anonymous said...

rent to buy ebook http://audiobookscollection.co.uk/fr/Photographie-num-rique/c1724/ decision at thunder rift ebook [url=http://audiobookscollection.co.uk/fr/Isaac-Asimov-Presents-Volume-7/p29006/]simon beckett ebook[/url] free download sex for one ebook

Anonymous said...

flight without formulae free download ebook http://audiobooksplanet.co.uk/es/Nein-zum-Leben-Ein-Essay/p228322/ lg phillips ebook [url=http://audiobooksplanet.co.uk/es/Diaspora-of-the-Gods-Modern-Hindu-Temples-in-an-Urban-Middle-Class-World/p226702/]ebook software for itouch[/url] archives for ebook broadcast com

Anonymous said...

ebook reader for ipaq rz1700 http://audiobooksplanet.co.uk/Properties-of-complex-inorganic-solids/p100060/ nude pose guide free ebook [url=http://audiobooksplanet.co.uk/Practical-Preimplantation-Genetic-Diagnosis/p220459/]ebook tally[/url] sony ebook reader dd10

Anonymous said...

the art molecular dynamics simulation ebook http://audiobooksworld.co.uk/Chapman-s-American-drawing-book/p216406/ m mahajan operational research ebook [url=http://audiobooksworld.co.uk/it/authors/?letter=Ru]primary perception ebook[/url] download spoken english pdf ebook
[url=http://audiobooksworld.co.uk/Charles-Vanden-Eynden/m19196/][img]http://audiobooksworld.co.uk/image/5.gif[/img][/url]

Anonymous said...

x10 software download activehome http://buyoemsoftware.co.uk/it/product-35365/3herosoft-iPad-to-Computer-Transfer-3-5-MacOSX goren bridge game pc software [url=http://buyoemsoftware.co.uk/product-33227/Red-Giant-Magic-Bullet-Looks-1-4-for-After-Effects-CS5]password break software[/url] palm treo 700wx software cd
[url=http://buyoemsoftware.co.uk/category-100-106/Server-Software?page=9]Server Software - Software Store[/url] shareware gps software 3d calibration
[url=http://buyoemsoftware.co.uk/de/product-35376/3herosoft-MPEG-to-DVD-Burner-3-5-MacOSX][img]http://buyoem.co.uk/image/4.gif[/img][/url]

Anonymous said...

mendez creador software rosario http://buysoftwareonline.co.uk/product-34178/AKS-Labs-Compare-Suite-Pro-7-0 optipoint 500 software drivers [url=http://buysoftwareonline.co.uk/de/product-37212/MetaProducts-Offline-Explorer-Pro-4-8]accounting software the sole trader[/url] manufacturing software development
[url=http://buysoftwareonline.co.uk/category-100-114/Other?page=2]Other - Software Store[/url] best flight training software
[url=http://buysoftwareonline.co.uk/de/product-37118/Frame-Photo-Editor-2-1][img]http://buyoem.co.uk/image/3.gif[/img][/url]

Anonymous said...

[url=http://certifiedpharmacy.co.uk/products/zanaflex.htm][img]http://onlinemedistore.com/6.jpg[/img][/url]
history of pharmacy law http://certifiedpharmacy.co.uk/products/methotrexate.htm arrow pharmacy [url=http://certifiedpharmacy.co.uk/products/bactrim.htm]pharmacy technician jobs[/url]
ledfords express pharmacy http://certifiedpharmacy.co.uk/products/mobic.htm tricare pharmacy on line [url=http://certifiedpharmacy.co.uk/products/voltaren.htm]voltaren[/url]
unc school of pharmacy http://certifiedpharmacy.co.uk/products/atrovent.htm cvs pharmacy corporate offices ct [url=http://certifiedpharmacy.co.uk/products/sinequan.htm]safeway pharmacy[/url]
pharmacy technician college http://certifiedpharmacy.co.uk/products/viramune.htm cvs pharmacy technician certification [url=http://certifiedpharmacy.co.uk/products/herbolax.htm]herbolax[/url]

Anonymous said...

[url=http://certifiedpharmacy.co.uk/products/plendil.htm][img]http://onlinemedistore.com/11.jpg[/img][/url]
th peoples pharmacy http://certifiedpharmacy.co.uk/products/relafen.htm classified ads for pharmacy [url=http://certifiedpharmacy.co.uk/products/lamisil.htm]pharmacy display cabinets[/url]
pharmacy society of wisconsin http://certifiedpharmacy.co.uk/products/rocaltrol.htm cambridge road pharmacy appeal seaforth [url=http://certifiedpharmacy.co.uk/products/methotrexate.htm]methotrexate[/url]
medical grade phenol pharmacy http://certifiedpharmacy.co.uk/products/floxin.htm average salary for a pharmacy technician [url=http://certifiedpharmacy.co.uk/categories/antibiotics.htm]allegra online pharmacy[/url]
l and s pharmacy http://certifiedpharmacy.co.uk/products/lotrisone.htm us pharmacy cialis [url=http://certifiedpharmacy.co.uk/products/zebeta.htm]zebeta[/url]

Anonymous said...

[url=http://certifiedpharmacy.co.uk/products/lipitor.htm][img]http://onlinemedistore.com/3.jpg[/img][/url]
allegra pharmacy http://certifiedpharmacy.co.uk/products/cordarone.htm bruces pharmacy scottsville va pharmacy [url=http://certifiedpharmacy.co.uk/products/zebeta.htm]lionville pharmacy[/url]
illinois board of pharmacy http://certifiedpharmacy.co.uk/catalogue/q.htm life extension pharmacy [url=http://certifiedpharmacy.co.uk/products/norvasc.htm]norvasc[/url]
price cialis mexico pharmacy http://certifiedpharmacy.co.uk/products/zyvox.htm pictures to do with pharmacy [url=http://certifiedpharmacy.co.uk/catalogue/m.htm]pharmacy birth control pill spain[/url]
fda online pharmacy http://certifiedpharmacy.co.uk/products/oxytrol.htm health pharmacy drugs medications zolpidem [url=http://certifiedpharmacy.co.uk/products/voltaren.htm]voltaren[/url]

Anonymous said...

Fantastic web site. Lots of helpful info here. I'm sending it to several pals ans additionally sharing in delicious. And of course, thank you in your effort!

Also visit my blog ... www.gpjasociados.com

Anonymous said...

Pretty nice post. I just stumbled upon your blog and wanted to say that I have truly enjoyed surfing around your blog posts.
After all I will be subscribing to your rss feed
and I hope you write again soon!

Feel free to surf to my blog post: Akribos Watches