New Message on dotNET User Group Hyd

Locking config setting using <location> tag

Reply
  Reply to Sender   Recommend Message 1 in Discussion
From: Nasha

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)   


View other groups in this category.

Click here
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to