This sample requires that the application directory and the configuration file within it (web.config) have write and modify permissions for the account running the page. Unless impersonation is in use this is the machine\ASPNET account on IIS5 or the NETWORK SERVICE account on IIS6. These permissions are required as web.config is copied and modified.