Yes.. SPWebConfigModification is the best way and good way.
Going forward I am using this class for web.config modifications.

Use your feature to add/remove config entries.

Just be careful once you use this class to add appsettings web.config, do
not manually update the web.config,  as in those cases it may not remove the
settings added, when you de-activate/uninstall the feature.



On Tue, Aug 24, 2010 at 5:30 PM, Paul Noone <
paul.no...@ceosyd.catholic.edu.au> wrote:

>  Hi guys,
>
>
>
> I want to make a web config modification programatically that adds/removes
> the following.
>
>
>
> <add key="MyKey" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
>
>
>
> There seem to be a few approaches and I was wondering what the best one
> was. Are there any methods to do this during add/retract solution or is it
> only possible via feature receiver? Is the 
> SPWebConfigModification<http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebconfigmodification.aspx>class
>  the best way to achieve this?
>
>
>
> Or can I create a custom appsettings.config file and just deploy it via the
> 80 directory in my solution?
>
>
>
> Kind regards,
>
> Paul Noone
>
>
>
> ---------------------------------------------------
> Online Developer/Administrator
>
> Information Communication and Technology
> Catholic Education Office, Sydney
> p: (02) 9568 8461
>
> f: (02) 9568 8483
> e: paul.no...@ceosyd.catholic.edu.au
> w: http://www.ceosyd.catholic.edu.au/
>
>
>
> _______________________________________________
> ozmoss mailing list
> ozmoss@ozmoss.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to