Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 13778

spWebconfigModification via Powershell: Exception calling "ApplyWebConfigModifications" with "0" argument(s)

$
0
0

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


Viewing all articles
Browse latest Browse all 13778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>