<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>.Net Geek &#187; Web.config</title>
	<atom:link href="http://www.aakashjain.com/tag/webconfig/feed" rel="self" type="application/rss+xml" />
	<link>http://www.aakashjain.com</link>
	<description>Technology, musings and stuff by Aakash Jain</description>
	<lastBuildDate>Mon, 04 Jan 2010 13:51:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Stop Web.config Inheritance into Child Application/Directories</title>
		<link>http://www.aakashjain.com/net/stop-webconfig-inheritance-into-child-applicationdirectories-605</link>
		<comments>http://www.aakashjain.com/net/stop-webconfig-inheritance-into-child-applicationdirectories-605#comments</comments>
		<pubDate>Tue, 31 Mar 2009 13:58:02 +0000</pubDate>
		<dc:creator>Aakash</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Web.config]]></category>

		<guid isPermaLink="false">http://www.aakashjain.com/?p=605</guid>
		<description><![CDATA[Asp.net configuration file, web.config (machine.config at server level)  applies to the directory in which it appears and all sub &#8211; directories. The configuration file hierarchy for a Asp.net site goes as shown below.

Here is a link where you can read more about web.config inheritance. While settings are inherited from the higher level of configuration file, [...]]]></description>
			<content:encoded><![CDATA[<p>Asp.net configuration file, web.config (machine.config at server level)  applies to the directory in which it appears and all sub &#8211; directories. The configuration file hierarchy for a Asp.net site goes as shown below.</p>
<p><img class="size-full wp-image-608 alignnone" title="Web.Config Inheritance Hierarchy" src="http://www.aakashjain.com/wp-content/uploads/2009/03/web_config_hierarchy.png" alt="Asp.net Configuration File Hierarchy" width="418" height="266" /></p>
<p>Here is <a href="http://msdn2.microsoft.com/en-us/library/ms178685.aspx" target="_blank">a link</a> where you can read more about web.config inheritance. While settings are inherited from the higher level of configuration file, child configuration files are always permitted to override them. Inheritance downward is useful for applying a unique settings for all applications on server but in certain situation a higher config file may want to prevent inheritance in child applications. This can be achieved by using the <a href="http://msdn.microsoft.com/en-us/library/b6x6shw7(VS.71).aspx" target="_blank">&lt;location&gt; element</a> as follows.</p>
<pre name="code" class="c-sharp:nocontrols">&lt;location path="." inheritInChildApplications="false"&gt;
&lt;system.web&gt;
...
...
&lt;/system.web&gt;
&lt;/location&gt;</pre>
<p>The above code can prevent inheriting the &lt;system.web&gt; element in this case, into the child web application. Please note that this piece of code should be placed in the parent&#8217;s web.config file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aakashjain.com/net/stop-webconfig-inheritance-into-child-applicationdirectories-605/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asp.Net Shared Folder: App_Code</title>
		<link>http://www.aakashjain.com/net/aspnet-shared-folder-app_code-41</link>
		<comments>http://www.aakashjain.com/net/aspnet-shared-folder-app_code-41#comments</comments>
		<pubDate>Tue, 14 Aug 2007 19:45:13 +0000</pubDate>
		<dc:creator>Aakash</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[App_Code]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Assemblies]]></category>
		<category><![CDATA[Bin]]></category>
		<category><![CDATA[codeSubDirectories]]></category>
		<category><![CDATA[Dll]]></category>
		<category><![CDATA[Special folders]]></category>
		<category><![CDATA[Web.config]]></category>

		<guid isPermaLink="false">http://www.aakashjain.com/AspNet+Shared+Folder+AppCode.aspx</guid>
		<description><![CDATA[Points to remember about APP_CODE Directory

Asp.net handles the files in bin and app_code folder in a special way.
The compiled classes (dll) placed in bin folder are automatically available to all the pages in application. We don’t need to register the assemblies to use them. Asp.net automatically detects the new version of assembly and start using [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Points to remember about APP_CODE Directory</strong></p>
<ul>
<li>Asp.net handles the files in bin and app_code folder in a special way.</li>
<li>The compiled classes (dll) placed in bin folder are automatically available to all the pages in application. We don’t need to register the assemblies to use them. Asp.net automatically detects the new version of assembly and start using the new one.</li>
<li>Assemblies in the bin folder have application scope. They cannot access the resources outside the current web application.</li>
<li>The access levels of assemblies are determined by the trust level specified by the local computer.</li>
<li>By default code run in full trust under visual studio development environment.</li>
<li>We can store and create as many folder and files (class files) in app_code folder. But Asp.net still compile all in a single assembly.</li>
<li>As Asp.net compiles all the code (App_code) in a single assembly, all files must be of same programming language. Ex &#8211; App_Code folder cannot contain code in both VB.Net and C#. However we can make settings in web.config to configure the code subdirectories in different compliable units. The configuration is specified by creating a “codeSubDirectories” element in the <a href="http://msdn2.microsoft.com/en-us/library/t990ks23.aspx" target="_blank">compilation</a> element of the Web.config file. Ex –</li>
</ul>
<blockquote>
<blockquote>
<blockquote>
<blockquote><p><span style="color: #0000ff;">&lt;compilation debug=&#8221;false&#8221;&gt;<br />
    &lt;codeSubDirectories&gt;<br />
        &lt;add directoryName=&#8221;VBCode&#8221; /&gt;<br />
        &lt;add directoryName=&#8221;CSCode&#8221; /&gt;<br />
    &lt;/codeSubDirectories&gt;<br />
&lt;/compilation&gt;</span></p></blockquote>
</blockquote>
</blockquote>
</blockquote>
<p><script type="text/javascript"><!--
google_ad_client = "pub-9528758703353085";
google_alternate_color = "FFFFFF";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text_image";
//2007-09-24: AJ_Blog_Entries
google_ad_channel = "9667763288";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066CC";
google_color_text = "000000";
google_color_url = "000000";
google_ui_features = "rc:0";
// --></script></p>
<p><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aakashjain.com/net/aspnet-shared-folder-app_code-41/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
