This was very helpfull and solved my Problem. But instead of creating a console application I simply made a PowerShell Script. The code is basically the same but I wanted to add it here for those who are still afraid of using PoweShell. Don't be. Powershell just rocks ;)
$siteUrl = "http://yoursiteurl/";
$site = $gc | Get-SPSite -Identity $siteUrl
[Microsoft.SharePoint.Administration.SPWebApplication]$webApp = $site.WebApplication
$webApp.WebConfigModifications.Clear();
$webApp.Update();
[Microsoft.SharePoint.Administration.SPWebService] $service =[Microsoft.SharePoint.Administration.SPWebService]::ContentService
$service.WebConfigModifications.Clear();
$service.Update();
$service.ApplyWebConfigModifications();
Finally just be careful because this code removes all modifications not only yours. So don’t use it on productive environments.
Keine Kommentare:
Kommentar veröffentlichen