Hi Group,
In ASP.NET is very easy to override configuration settings defined in the machine.config. All that you need to do is create a web.config file and specify the settings in it. Sometimes we want that certain configuration settings are not overridden by any application esp if it is your company server hosting many applications.In that case we need to lock these settings.
There is a tag called <location> tag which can be added to machine.config file. This tag has two attributes named path which is the path of the application and allowOverride which takea a boolean value. If we set the value of allowOverride attribute as false then if the application mentioned in the path tries to override config settings will get an error.
e.g.
<configuration>
<location path="DefaultwebsitePath/MyApp" allowOverride="true">
<system.web>
|
| Session state settings, trace settings etc
|
</system.web>
</location>
</configuration>
Now if MyApp tries to overrider these settings it will get an error.
-- Please post your queries and comments for my articles in the user group for the benefit of all. I hope this step from my end is helpful to all of us. You can find all articles written by me at my personal blog http://spaces.msn.com/members/nasha.
Regards,
Namratha (Nasha)