문제

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)  
도움이 되었습니까?

해결책 3

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.

다른 팁

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top