Restore Machine.Config file

If you made any changes to machine.config file and wish to restore it to its default , the .NET 2.0 framework provide a backup for this file incase you wish to reset it.

You will find two files in the framework installation path (\%SystemRoot%\Microsoft .NET\Framework\%VersionNumber%\CONFIG\) :image

- machine.config.comments : contains a descriptive comments for each key in the machine.config along with it's default or recommended value.

- machine.config.default: contains the original machine.config values

To restore the original file just copy the content or copy the file and rename it.

(BTW : this post belongs to do more with less using .NET series which I promised to continue)

3 Comments

  • hello,in mt machine.config i only have system.web.security.sqlmembership,if i want to add antoher security membership what should i do?tnax

  • Thanks. That got my web app running again. Now I will compare the running and the bad config file and see what changed and if I want to recover any section(s).

    Thanks.

  • Thanks, I messed these up trying to get membership and roles working. Over-wrote them using the defaults and was back in business.

Comments have been disabled for this content.