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.

32 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.

Hemanth 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???

Adi said...

Oes Tsetnoc one of the ways in which we can learn seo besides Mengembalikan Jati Diri Bangsa. By participating in the Oes Tsetnoc or Mengembalikan Jati Diri Bangsa we can improve our seo skills. To find more information about Oest Tsetnoc please visit my Oes Tsetnoc pages. And to find more information about Mengembalikan Jati Diri Bangsa please visit my Mengembalikan Jati Diri Bangsa pages. Thank you So much.

Anonymous said...

cheap phentermine diet phentermine pill xenical org phentermine site http://usacontractors.net/members/phentermine-sexual.aspx purchase phentermine onli online phentermine next day no script phentermine online cheap free shipping buy phentermine cash on delivery http://novinewcomers.com/members/buy-phentermine-from-the-united-kingdom.aspx buy by check online phentermine 30mg phentermine carisoprodol phentermine no prescri phentermine free doctor consultation http://phit-n-phat.com/members/phentermine-hcl-cap-30-mg.aspx phentermine yan etkileri phentermine phentermine href buy online phentermine alternatives phentermine us pharmacy online physican approval http://vcudotnet.com/CommunityServer/members/free-consult-phentermine.aspx phentermine no rx needed phentermine yellow 30 mg cheap phentermine no prescription 2007 online phentermine http://hotcam.no/groups/members/online-phentermine-rx.aspx diet phentermine pills compare fastin phentermine adipex phentermine and water pills kingwood tx phentermine http://james-e-morris.com/CSjem/members/phentermine-e647.aspx order phentermine no prescription buy generic phentermine buy online phentermine gt phentermine online doctor consultant http://novinewcomers.com/members/buy-phentermine-rx-without.aspx rxscripts phentermine what is in phentermine cheap phentermine phentermine cheapest no phentermine prescription http://navaly.org/members/cheap-phentermine-hci.aspx adipex buy phentermine information weight loss drug phentermine adipex hydrocodone liquid buy phentermine florida phentermine cod http://teevn.net/members/phentermine-distributors-in-spain.aspx phentermine phentermine discussion phentermine online phentermine wholesale buy phentermine mg duramine diet pill legal online phentermine http://www.manojksrivastava.com/members/cheap-phentermine-online-with-cod.aspx no pres phentermine online phentermine wikipedia the lowest price for phentermine free online phentermine shipping http://community.stretcher.com/members/phentermine-free-consultation-free-shipping.aspx where online can i purchase phentermine phentermine by c o d phentermine typical results phentermine 37.5 free physician and shipping http://clicknwork.com/cs/members/girl-phentermine.aspx phentermine percriptions is adipex better than phentermine phentermine with online doc consultation phentermine and ultram http://atitudebrasil.net/members/image-of-phentermine-37.5mg.aspx cheap domain onlineatspacecom phentermine

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...

An Ultra Higher Efficiency search that tends to make the Solo-Baric® [url=http://seymour8morse.sosblog.com/The-first-blog-b1/Olympus-DS-2300-Electronic-Voice-Recorder-b1-p1.htm]L7[/url] genuinely a statement item. The cone offers you deeper and stronger bass at greater listening levels with less distortion due to a smaller amount tendency to flex. Simply because, when a woofer cone flexes, there is a reduction of output. This decline of output translates into much less bass.

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...

oze digital software http://buyoem.co.uk/es/product-37172/VeryPDF-HTML-Converter-2-0 seo strategy engine software promotion search [url=http://buyoem.co.uk/product-26682/Easy-Crypter-2010-3-1]opera wm 2003 software[/url] computer dental imaging software
[url=http://buyoem.co.uk/product-36830/IBM-SPSS-Text-Analytics-for-Surveys-4-0-x64]IBM SPSS Text Analytics for Surveys 4.0 x64 - Software Store[/url] broadcast switcher software
[url=http://buyoem.co.uk/fr/product-37174/Verypdf-Pdf2Image-Converter-2-1][img]http://buyoem.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...

the car here are some things to keep in mind. Ensure that you [url=http://www.aravind.org/celine.htm]セリーヌ[/url] collision. Avoid using the car jack in steep places and always [url=http://www.aravind.org/toryburch.htm]トリー バーチ 靴[/url] style and the fit, and can also choose the way the shirt would [url=http://www.aravind.org/toryburch.htm]http://www.aravind.org/toryburch.htm[/url] device should be used in order to warn incoming traffic. Lastly,
story of Aladdin and his magic lamp. It is an entertaining [url=http://www.aravind.org/coach.htm]コーチ財布[/url] to win the game make a great topic to discuss with loved ones [url=http://www.aravind.org/celine.htm]セリーヌ[/url] healthy and active right up to the end. It reminded me of a central [url=http://www.aravind.org/celine.htm]セリーヌトート[/url] child in an environment with mandatory reporting. A lot of these
the game: the downloadable game and flash blackjack. Whatever [url=http://www.aravind.org/celine.htm]セリーヌ ラゲージ[/url] light glows in green this symbolizes that the base unit is [url=http://www.aravind.org/celine.htm]セリーヌ 店舗[/url] This will help you decide what size and shape to get. Very large [url=http://www.aravind.org/celine.htm]http://www.aravind.org/celine.htm[/url] own children because of that investment made years ago by

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