View Complete Thread
  • error in GetWebConfigCommand

    Jan 17, 2011 12:49 AM|jijizz|LINK

    This is a question around IIS powershell snapin (webadministration). I run   Get-WebConfigFile 'IIS:\Sites\SharePoint - 80' Gives me error:Get-WebConfigFile : Filename: \\?\D:\inetpub\wwwroot\wss\VirtualDirectories\twcmbmfarm280\web.config
    Line number: 742
    Error: The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration
    At line:1 char:18
    + Get-WebConfigFile <<<< 'IIS:\Sites\SharePoint - twcmbmfarm280'
        + CategoryInfo : NotSpecified: (:) [Get-WebConfigFile], COMException
        + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.GetWebConfigCommand
     This only happens when IIS site is registered with .Net4 and does not repro in a .Net 3.5 machine I am using IIS7, win2008 R2, .Net 4.Please let me know if you have any idea about this failure.