Hi,
I am trying to add webconfigmodifications to a web.config. I use this Powershell script that can be found at this blogpost, but I already tried a dozen scripts.. It is always this exception..
http://gallery.technet.microsoft.com/scriptcenter/c5ff9839-08c7-426b-ade4-9bc19da5377c
Regardless what I am adding I always receive this Exception:
Exception calling "ApplyWebConfigModifications" with "0" argument(s): "Object reference not set to an instance of an object."
At C:\Powershell\addSPWebConfigMod.ps1:116 char:43
+ $webapp.Parent.ApplyWebConfigModifications <<<< ()
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
Does anyone know why?
Thanks
Sven