SOCIAL-3606 and DNN-6072: fix for locked web.config file upon saving

Note: I found nothing related to the other issue (stored procedure not found) other than an error during the installation process that prevented this SPROC from being installed. Moreover, the log installation file didn't show any error.