{"id":1844,"date":"2014-12-31T13:15:07","date_gmt":"2014-12-31T11:15:07","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=1844"},"modified":"2014-12-29T14:59:39","modified_gmt":"2014-12-29T12:59:39","slug":"many-web-config-have-merged-together","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/","title":{"rendered":"Many Web.config have merged together"},"content":{"rendered":"<p>You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the configuration for a given project it will usually show up in your development environment right away and will not make it to production.<\/p>\n<p>But here is a problem that occurred to me a few times and that had me pretty stumped at first. When deploying an ASP.NET MVC or ASP.NET WebForms application to an IIS (Internet Information Service) server, it looked like configurations from unrelated Web.config or other .config files merged together. Errors were popping up from assembly versions or configurations that should not even be used in the new application! So what were those mystery configurations?<\/p>\n<p>In IIS, the <em>Sites<\/em> folder is a container for all the applications and virtual directories of the server. The <em>Sites<\/em> folder has a physical root directory even it if doesn\u2019t contain files specific to an application. In fact, configurations files from that folder are merged with the configuration of all your applications. Here is the configuration in IIS for the physical path of that folder:<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/DefaultWebSite.png\"><img decoding=\"async\" class=\"aligncenter wp-image-1855\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/DefaultWebSite-1024x530.png\" alt=\"DefaultWebSite\" width=\"850\" height=\"440\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/DefaultWebSite-1024x530.png 1024w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/DefaultWebSite-300x155.png 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/DefaultWebSite.png 1025w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/a><\/p>\n<p>In my case, the root folder pointed to another application on the same server, so the configurations made no sense for the new application. To solve the problem, I just made sure than the wwwroot folder was empty or contained only configurations that I intended to share with all the applications hosted on the server.<\/p>\n<p>For references purpose, here is the configuration for the physical path of each individual application. You don\u2019t need to point to a folder under wwwroot as long as the folder used has the proper permissions to be seen from the web.<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/HelloWorldApp.png\"><img decoding=\"async\" class=\"aligncenter wp-image-1856\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/HelloWorldApp-1024x529.png\" alt=\"HelloWorldApp\" width=\"850\" height=\"440\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/HelloWorldApp-1024x529.png 1024w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/HelloWorldApp-300x155.png 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/HelloWorldApp.png 1025w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/a><\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/blog.cindypotvin.com\/many-web-config-seems-to-be-merged-together\/\">Many Web.config have merged together<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Cindy Potvin at the <a href=\"http:\/\/blog.cindypotvin.com\/\">Web, Mobile and Android Programming<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the configuration for a given project it will usually show up in your development environment right away and will not make it to production. But here &hellip;<\/p>\n","protected":false},"author":36,"featured_media":1865,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-1844","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Many Web.config have merged together - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Many Web.config have merged together - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-31T11:15:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Cindy Potvin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/CindyPtn\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cindy Potvin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/\"},\"author\":{\"name\":\"Cindy Potvin\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/5c5df30ebfba793235473ab81edbd742\"},\"headline\":\"Many Web.config have merged together\",\"datePublished\":\"2014-12-31T11:15:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/\"},\"wordCount\":321,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg\",\"articleSection\":[\"ASP.NET\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/\",\"name\":\"Many Web.config have merged together - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg\",\"datePublished\":\"2014-12-31T11:15:07+00:00\",\"description\":\"You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ASP.NET\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/asp-net\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Many Web.config have merged together\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/5c5df30ebfba793235473ab81edbd742\",\"name\":\"Cindy Potvin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/957776d6732b26df4f63c29c8a3cb127ef09eb38b9f5befec1840ee3a1abed32?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/957776d6732b26df4f63c29c8a3cb127ef09eb38b9f5befec1840ee3a1abed32?s=96&d=mm&r=g\",\"caption\":\"Cindy Potvin\"},\"description\":\"Cindy is a programmer with over 5 years of experience developing web applications. She also works on Android applications and share her knowledge via her blog and on Twitter.\",\"sameAs\":[\"http:\/\/blog.cindypotvin.com\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/CindyPtn\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/cindy-potvin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Many Web.config have merged together - Web Code Geeks - 2026","description":"You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/","og_locale":"en_US","og_type":"article","og_title":"Many Web.config have merged together - Web Code Geeks - 2026","og_description":"You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the","og_url":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2014-12-31T11:15:07+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg","type":"image\/jpeg"}],"author":"Cindy Potvin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/CindyPtn","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Cindy Potvin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/"},"author":{"name":"Cindy Potvin","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/5c5df30ebfba793235473ab81edbd742"},"headline":"Many Web.config have merged together","datePublished":"2014-12-31T11:15:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/"},"wordCount":321,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg","articleSection":["ASP.NET"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/","url":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/","name":"Many Web.config have merged together - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg","datePublished":"2014-12-31T11:15:07+00:00","description":"You can have more than one Web.config in an application and they will all be merged in the end, which is fine. Also, if you have a problem with the","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/asp-dotnet-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/asp-net\/many-web-config-have-merged-together\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"ASP.NET","item":"https:\/\/www.webcodegeeks.com\/category\/asp-net\/"},{"@type":"ListItem","position":3,"name":"Many Web.config have merged together"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/5c5df30ebfba793235473ab81edbd742","name":"Cindy Potvin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/957776d6732b26df4f63c29c8a3cb127ef09eb38b9f5befec1840ee3a1abed32?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/957776d6732b26df4f63c29c8a3cb127ef09eb38b9f5befec1840ee3a1abed32?s=96&d=mm&r=g","caption":"Cindy Potvin"},"description":"Cindy is a programmer with over 5 years of experience developing web applications. She also works on Android applications and share her knowledge via her blog and on Twitter.","sameAs":["http:\/\/blog.cindypotvin.com\/","https:\/\/x.com\/https:\/\/twitter.com\/CindyPtn"],"url":"https:\/\/www.webcodegeeks.com\/author\/cindy-potvin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1844"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1844\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1865"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}