Failed to apply web.config mods through central admin

Rob
  • Failed to apply web.config mods through central admin Rob

    I’m trying to set the authentication provider for a newly created web site (Application Management -> Authentication Providers). I try to set it to either Forms or Windows (the setting doesn’t matter).

    When I click save I get...

    Failed to apply a web.config modification to file 'configuration/system.web/pages'. The specified node "C:\Inetpub\wwwroot\wss\VirtualDirectories\testsolution9\web.config" was not found in the web.config file. at Microsoft.SharePoint.Administration.SPWebConfigFileChanges.ApplyModificationsWebConfigXmlDocument(XmlDocument xdWebConfig, String filepath)

    I check the web.config file and the section is present! Here it is...

    <pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">
          <namespaces>
            <remove namespace="System.Web.UI.WebControls.WebParts" />
          </namespaces>
          <tagMapping>
            <add tagType="System.Web.UI.WebControls.SqlDataSource, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mappedTagType="Microsoft.SharePoint.WebControls.SPSqlDataSource, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
          </tagMapping>
        </pages>
    

    However I don’t get the error when I select an old web application to change provider. I’ve even copied the entire contents of the old web.config into the new sites’ web.config, but I still get the same error.

    On a separate but related note I have a solution that adds the Ajax entries into the web.config file and it produces the same error message.

    I’ve googled a lot but can’t seem to get anywhere, they all say "add in the pages section" but it’s already there?

    Update 1

    I've been looking through the SharePoint logs (yuk) and have got these entries, the last one being the actual error.

    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/configSections Node name - sectionGroup[@name='system.web.extensions'] Node value - 
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/configSections/sectionGroup[@name='system.web.extensions'] Node name - sectionGroup[@name='scripting'] Node value -      
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/configSections/sectionGroup[@name='system.web.extensions']/sectionGroup[@name='scripting'] Node name - section[@name='scriptResourceHandler'] Node value -     
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/configSections/sectionGroup[@name='system.web.extensions']/sectionGroup[@name='scripting'] Node name - sectionGroup[@name='webServices'] Node value -   
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/configSections/sectionGroup[@name='system.web.extensions']/sectionGroup[@name='scripting']/sectionGroup[@name='webServices'] Node name - section[@name='authenticationService'] Node value -      
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/configSections/sectionGroup[@name='system.web.extensions']/sectionGroup[@name='scripting']/sectionGroup[@name='webServices'] Node name - section[@name='jsonSerialization'] Node value -    
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/configSections/sectionGroup[@name='system.web.extensions']/sectionGroup[@name='scripting']/sectionGroup[@name='webServices'] Node name - section[@name='profileService'] Node value -   
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/SharePoint/SafeControls Node name - SafeControl[@Assembly='System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'][@Namespace='System.Web.UI'][@TypeName='*'] Node value -    
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.diagnostics/switches Node name - add[@name='DiagnosticsSwitchesGeneralMod'] Node value -      
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.diagnostics/switches Node name - add[@name='DiagnosticsSwitchesHttpModuleExceptionHandlerMod'] Node value -    
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration Node name - system.web.extensions Node value -    
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web.extensions Node name - scripting Node value -      
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web.extensions/scripting Node name - webServices Node value -    
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web/compilation/assemblies Node name - add[@assembly='System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'] Node value -     
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web/httpHandlers Node name - add[@path='*.asmx'] Node value -    
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web/httpHandlers Node name - add[@path='*_AppService.axd'] Node value -    
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web/httpHandlers Node name - add[@path='ScriptResource.axd'] Node value -   
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web/httpModules Node name - add[@name='HttpModulesMod'] Node value -     
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web/httpModules Node name - add[@name='ScriptModule'] Node value -      
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     Topology                        8gp8    Medium      Adding web config node - Path - configuration/system.web/httpModules Node name - add[@name='Session'] Node value -   
    03/30/2010 14:12:54.11  w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     General                         8nca    Verbose     Application error when access /_admin/Authentication.aspx, Error=Failed to apply a web.config modification to file 'configuration/system.web/pages'.  The specified node "C:\Inetpub\wwwroot\wss\VirtualDirectories\testsolution11\web.config" was not found in the web.config file.   at Microsoft.SharePoint.Administration.SPWebConfigFileChanges.ApplyModificationsWebConfigXmlDocument(XmlDocument xdWebConfig, String filepath)     at Microsoft.SharePoint.Administration.SPWebApplication.ApplyWebConfigModifications()     at Microsoft.SharePoint.Administration.SPWebApplication.Provision()     at Microsoft.SharePoint.Administration.SPWebApplication.UpdateAuthenticationSettings(SPUrlZone zone, SPIisSettings newSettings, Boolean createJob)     at Microsoft.SharePoint.Administration.SPWebApplication.Updat...  
    03/30/2010 14:12:54.11* w3wp.exe (0x17C4)                           0x1F00  Windows SharePoint Services     General                         8nca    Verbose     ...eAuthenticationSettings(SPUrlZone zone, SPIisSettings newSettings)     at Microsoft.SharePoint.ApplicationPages.AuthenticationPage.BtnSave_Click(Object sender, EventArgs e)     at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  
    

  • Is that really the error message?

    It seems to me that something is transposed, perhaps indicating something is making a web config modification in code but with a bug. It seems strange to me that the message states:

    • "Failed to apply a web.config modification to file 'configuration/system.web/pages'". This is not a file - that's a node!
    • "The specified node "C:\Inetpub\wwwroot\wss\VirtualDirectories\testsolution9\web.config" was not found..". This is not a node - that's a file!

    Can you think of anything in your solution which could cause this?

  • I believe the API code throwing the exception has a bug that swaps the parameters: Check out this page (Bottom of #1).

  • I've traced this back to an install of the CKS Blog Edition, it seems to have done something to the sharepoint web.config modifications.

Related questions and answers
  • ;metaData> &lt;type name="Microsoft.SharePoint.WebPartPages.SPUserCodeWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /&gt; &lt...;Codezeven.Social.Views, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c56ab109c2917056&lt;/property> &lt;property name="TypeFullName" type="string"&gt...;/PartImageLarge> &lt;IsIncludedFilter /&gt; &lt;Assembly>Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&lt;/Assembly> &lt;TypeName>

  • deactivate it it doesn't remove it but i get error: Failed to instantiate file "myStoreComms.webpart" from module "WebPartPopulation": Source path "myStoreComms.webpart" not found. Any ideas.. .what...;?xml version="1.0" encoding="utf-8" ?&gt; &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt; &lt;Module Name="WebPartPopulation" Url="_catalogs/wp" RootWebOnly="TRUE"&gt...I have a webpart i build using WSpBuilder and it works OK. When i use Deploy from Visual Studio it installs the WSP sharepoint and add the webpart to the webpart gallery. But it seems the feature

  • in a WebPart zone. When doing this, I get an error message : Tooltips: List View Web Part could not be added, list may be hidden. What's wrong with the list? feature.xml &lt;?xml version="1.0..., Culture=neutral, PublicKeyToken=1de0ffdb1fdf1b80" ReceiverClass="MyApp.WebServices.TooltipsReceiver" xmlns="http://schemas.microsoft.com/sharepoint/"&gt; &lt;ElementManifests> &lt..." /&gt; &lt;/ElementManifests> &lt;/Feature> elements.xml &lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt; &lt;/Elements>

  • that it cant find workflow DLLs: 07/27/2010 11:25:10.92 CheckerService.exe (0x12F4) 0x1400 Windows SharePoint Services Workflow Infrastructure 75yn Unexpected Load Workflow Assembly: System.IO.FileNotFoundException: Could not load file or assembly 'CaseWF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3e9de178cbaba7a' or one of its dependencies. The system cannot find the file specified. File name: 'CaseWF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3e9de178cbaba7a' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence

  • is signed with it's own strong name key. We I now deploy the solution, I get the following error when the code tries to use the business logic dll: Web Part Error: Unhandled exception was thrown...=neutral, PublicKeyToken=0b5230b1615a26d4 The method that caused the failure was: System.String Toggle(System.String) The Zone of the assembly that failed was: MyComputer The Url of the assembly that failed was: file:///C:/ProgramData/Microsoft/SharePoint/UCCache/8CCB51CC8164124/CF0F683C1542422E80050AFD2BD3D785%2DHbWRnjvb49VmZuA5OCXjhZbPX0JMH5a6kSdXvb4VoxE%3D-8/SharePointProject1.dll

  • someone else has cracked this nut. &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt; &lt;Module Name="Pages"&gt; &lt;File Path="" Url...://schemas.microsoft.com/WebPart/v2/Image"&gt; &lt;Assembly>(Assembly), Version=1.0.0.0, Culture=neutral, PublicKeyToken=12baeb5f1600543c&lt;/Assembly> &lt;TypeName>... Module: I think this is the most likely path forward, however it seems to always want to provision a file to the site. For example, if I want to add a web part to the home page (default.aspx

  • (I have also asked this question on Stack Overflow) I have a SharePoint feature I'm using to add some custom aspx files to the Pages Library. When I activate the feature, I can visit the pages in-browser and they are visible in SPDesigner, but when I "View All Site Content" they are not there. Why is this the case? The Feature's Elements File: &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Elements Id="9e85eb79-6d8d-4ff3-b0d4-64d55c3bb577" xmlns="http://schemas.microsoft.com/sharepoint/"&gt; &lt;Module Name="Pages" Url="Pages"&gt; &lt;File Path="Example.aspx" Url

  • ;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&gt; &lt;System> &lt;Provider Name="SharePoint 2010 Products Configuration Wizard" /&gt; &lt;EventID Qualifiers="0"&gt...-Failed-Step8.png Event Viewer contains this entry: Log Name: Application Source: SharePoint 2010 Products Configuration Wizard Date: 2/9/2010 6:03:01 PM Event ID: 104... that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56) ---&gt

  • In the Upload Document dialog box, when I click Upload Multiple Files..., I get Microsoft .NET Framework error dialog box. When I click on Details button, it gives the following error message...) ************** Loaded Assemblies ************** mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.3603 (GDR.050727-3600) CodeBase: file:///C:/WINDOWS/Microsoft.NET... Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000) CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

Data information