1
votes

Somehow, I have an extra "Telerik.Web.UI.WebResource.axd_*" handler being automatically added to every SharePoint application web.config in my farm, EVERY time I create a new web application. I need to get rid of this modification as it is breaking all sites on the farm every time a new web app is created. I have not figured out how to do this. Uninstalling the Telerik product (RadControls for SharePoint) did not fix the problem. (In fact, the uninstall process inexplicably re-added the handler in those web.configs where we had manually removed it.)

Did some research and apparently the web.config for a new web app is generated in 3 steps as described on the following page (scroll down to “Where does the web.config file come from then”):

http://www.charleslee.co.uk/blog/2010/10/28/webconfig/

Steps:

  1. Root web.config is applied...in my case this file has not been modified.
  2. Supplemental web.configs are applied...I see none that have been created recently or that have anything to do with Telerik.
  3. Config DB mods are applied...I wrote an app that enumerates all SPWebConfigModification modifications for every web app on the farm, and nothing related to Telerik was returned.

So my question is, what am I missing in regards to how web.configs are generated for new web apps?

1
(There is also the SharePoint-specific stack; it is less-populated but this question might be better suited there because this it is more oriented towards management than development.)user166390
Maybe Telerik has some features which adds SPWebConfigModification or even changes web.config directly.Oleg Savelyev
@pst, I went ahead and posted the question to the SharePoint stack.Tawab Wakil
@Oleg, That's what I thought too, but the question now is how to remove the addition. I'm looking at the list of current SPWebConfigModifications on the farm and there is nothing about Telerik.Tawab Wakil

1 Answers

0
votes

Never mind, I solved the problem. The answer to my question in the original post is that I didn't miss anything in how configs are generated. The issue was that my procedure for iterating through all SPWebConfigModification mods was apparently wrong (is this stuff documented?). Instead of getting an instance of the farm and iterating through SPWebService web apps, I changed it to iterate through mods returned by SPWebService.ContentService. This revealed the Telerik changes that had been made.

SPWebService spService = SPWebService.ContentService;
if (spService != null)
{
    Collection<SPWebConfigModification> modifications = spService.WebConfigModifications;
    if (modifications != null)
    {
        for (int i = modifications.Count - 1; i >= 0; i--)
        {
          ...
        }
    }
}

With that question out of the way, now I can work on the code to remove the undesired mods.