How to add a new <location path= with all settings to web.config programatically C#?
I have a form in which is a TextBox and a Button on which when i click it gets the textbox text, and creates in web.config:
<location path=" <-- TextBox.Text -->">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Thank you 🙂
Asp.net does not allow to change web.config diagrammatically, however you can change it by using file io classes which is not preferred way.
You can make a setting xml file and use it for reading/writing your setting from code.