locked
Error in activating WebConfigFeature RRS feed

  • Question

  • I am getting the below error while making a change in the SharePoint Site web.config file using the SPFeatureReceiver:

    Error in activating WebConfigFeature
    System.Xml.XPath.XPathException: 'add[@key='add[@key='authorDll']']' has an
    invalid token.
       at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t)

       at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput)
       at
    MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput)

       at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput)

       at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput)

       at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode
    qyInput)
       at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode
    qyInput)
       at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode
    qyInput)
       at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode
    qyInput)
       at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode
    qyInput)
       at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode
    qyInput)
       at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String
    xpathExpresion)
       at MS.Internal.Xml.XPath.QueryBuilder.Build(String query,
    Boolean allowVar, Boolean allowKey)
       at
    System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver
    nsResolver)
       at System.Xml.XPath.XPathNavigator.Select(String xpath)

       at System.Xml.XmlNode.SelectSingleNode(String xpath)
       at
    Microsoft.SharePoint.Administration.SPWebConfigFileChanges.ApplyModificationsWebConfigXmlDocument(XmlDocument
    xdWebConfig, String filepath)
       at
    Microsoft.SharePoint.Administration.SPWebApplication.ApplyWebConfigModifications()

       at
    Microsoft.SharePoint.Administration.SPWebService.ApplyWebConfigModifications()

       at
    LDAPHTTPModule.Features.LDAPHTTPModuleConfigChanges.LDAPHTTPModuleConfigChangesEventReceiver.<>c__DisplayClass2.<FeatureActivated>b__0()

       at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)

       at
    Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()

       at
    Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated
    secureCode)
       at
    Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback
    secureCode, Object param)
       at
    Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated
    secureCode)
       at
    LDAPHTTPModule.Features.LDAPHTTPModuleConfigChanges.LDAPHTTPModuleConfigChangesEventReceiver.FeatureActivated(SPFeatureReceiverProperties
    properties)

    Basically, the cause of this error is the invalid node which i was trying to add in the config file. But, the current issue is that I am not able to make any valid web.config changes on the site even using a new feature.

    It looks like SharePoint has added this key "'add[@key='add[@key='authorDll']']'" in some buffer and everytime i try to make any web.config change it first tries to add this to the config file and ends up with the same message. I even tried to make a new feature but still getting the same. Also, i tried the same on different server and was able to deploy successfully.

    Please suggest how can i get rid of this error.

    Thanks


    KC

    Friday, February 15, 2013 10:01 PM

All replies

  • Hi,

    I understand that you get an error when try to edit the web.config file using SPFeatureReciever. Now you need to check whether the feature have been activated. If so, try to deactivate it to revert the change back. Then check the web.config file manually by searching the authorDll in the file. If the changes have been reverted back, you can perform an IIS reset to see whether it clears the cache.

    For more information about SPFeatureReceiver, please refer to this site:

    Web.config modifications with a SharePoint feature: http://weblogs.asp.net/wesleybakker/archive/2009/01/21/web.config-modifications-with-a-sharepoint-feature.aspx

    Thanks,

    Entan Ming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contacttnmff@microsoft.com.


    Entan Ming
    TechNet Community Support

    Monday, February 18, 2013 6:22 AM
    Moderator
  • Thanks Entan for your reply. I have deactivated and deleted the feature and also verified the changes has been reverted from the Web.config file but I am still getting  the same error.

    Thanks,

    Kunal


    KC

    Tuesday, February 19, 2013 7:17 PM
  • Hi,

    You need to check  BLOB cache settings, cache profile settings and object cache settings. If you have enabled these cache, you need to disable them. If you haven’t enable these cache, you can copy a web.config file from another web application for use in current web application(make a copy of this file before replacing it).

    For more information, please refer to this site:

    Configure cache settings for a Web application (SharePoint Server 2010): http://technet.microsoft.com/en-us/library/cc770229(v=office.14).aspx

    Thanks,

    Entan Ming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contacttnmff@microsoft.com.


    Entan Ming
    TechNet Community Support

    Wednesday, February 20, 2013 11:04 AM
    Moderator
  • Once again thanks Entan for your reply, but I am still getting the same error and I tried the following:

    1. validated if I am using any type caching as you mentioned. But, I am not using any.

    2. Deployed  old web config from the same server. (config backup before deploying this release)

    3. We usually do config changes with every release. so, I tried to deactivate a existing feature which was earlier used to make config changes but even while deactivating it returned the same error.

    Kunal


    KC

    Friday, February 22, 2013 9:17 PM
  • Hi,

    Thank you for your question. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience. Thank you for your understanding and support.

    Thanks,

    Entan Ming

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contacttnmff@microsoft.com.


    Entan Ming
    TechNet Community Support

    Monday, February 25, 2013 2:22 AM
    Moderator