Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

The SPWebConfigModification class can be used for updating content web applications and also central administration. This can be applied to the SPWebApplication and also SPWebService classes. SPWebService derives from SPService, and has the WebConfigModifications property and the ApplyWebConfigModifications() method.

Is it possible, however, to register modifications to be applied to service applications? Service applications are reprented by classes that derive from SPIisWebServiceApplication, which derives from SPServiceApplication, i.e. is in a different branch of the class hierarchy derived from SPService and does not have the WebConfigModifications property.

For example if you need to make web.config modifications to the security token service (represented by the internal class SPSecurityTokenService, which derives from SPIisWebServiceApplication).

I considered a solution to deploy a replacement web.config into 14\WebServices\SecurityToken, but not sure if that is too messy (and you can't, for example, easily parametise the settings).

share|improve this question
add comment

1 Answer

Is it possible, however, to register modifications to be applied to service applications

No

This is exactly the reason why I tend to do all my web.config changes with xsl transforms/xml pokes

Web.Config changes to extended sites programatically

share|improve this answer
    
I have had issues when using the IIS7 powershell plugins to set web.config blocks too –  djeeg May 4 '11 at 7:50
    
+1! SPWebConfigModification is a native, but a very buggy way of doing this. Take a look at this post: msmvps.com/blogs/laflour/archive/2010/01/05/… –  Andrey Markeev May 4 '11 at 7:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.