views:

406

answers:

4

I want to change the trust level of a Sharepoint Web Application without having to change the web.config manually (i.e. WSS_Minimum, WSS_Custom, etc). Making manual changes to the web.config tag is highly undesirable in anything other than a one-server farm. Is there any way via stsadm or Central Admin to change this?

Third party tools or a Powershell script would be acceptable in that they would make clear that there's no native way to accomplish this.

Thanks in advance

A: 

Create a CAS policy?

IrishChieftain
+1  A: 

See my answer here. There's an object model call to propagate web config modifications to every server in a farm as well as a freely available Central Admin plugin that wraps the OM in an easier to use interface.

OedipusPrime
Thanks for this. I like being able to see explicitly what changes have been made and this tool gives you a good way of doing so. Cheers
Knowledgethoughts
+1  A: 

There is a class designed for this called SPWebConfigModification that will propagate your changes to all member servers of the farm.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebconfigmodification.aspx

-Oisin

x0n
+1  A: 

SPWebConfigModifications are a pain.. but this stsadm extension will make it a lot easier.

ArjanP
Wish I could split "the tick" for this answer.I slightly prefer the recommendation of OedipusPrime, but your suggestion is an appropriate approach. What I prefer about the visual interface is that it makes clear the changes that have been put in place. With this approach, you do get the benefit of being able to test and deploy it in a reliable manner on any server with stsadm.webconfig installed which is useful from a scripting / deployment perspective and is decidedly less manual.
Knowledgethoughts
Thats how I use it.. some things are set on install only, like the .NET 3.5 settings. These are simply added on as post-1st-install scripts and never need looking at again. It depends on your application.. if you have one where people are continuously creating new web applications or the changes are very dynamic the scripting solution is not useful.
ArjanP