locked
Updating the web.config file using workflow? RRS feed

  • Question

  • Hi,

    Is there a way to update the changes in web.config file using the work flow?

    below is the situation -

    1> I have intranet and FormBased(FB) sharepoint site. There is a need to update the web.config with some httpmodule which may be applied on FB site or on the intranet. Connection string tag would be used for FB sharepoint site and not for intranet.

    2> how do i control this and successfully apply the web.config changes on granular level. I had thought of SPwebconfigmodification class. But I have read somewhere that it make changes on the config database as well. Because of this sometimes the config DB has gone corrupt. So, I am skeptical about this one. Also this will apply across all web applications irrespective of intranet or FB site.

    3> Then I thought of using workflow, to streamline the updates that would happen on the web.config files across the web applications.

    Any takers on this one? would this be a viable solution? Does workflow support updating files located on servers?

     

    Regards,

    SSM

     

    • Edited by Mike Walsh FIN Tuesday, March 8, 2011 1:55 PM ask one question at a time
    • Moved by Mike Walsh FIN Tuesday, March 8, 2011 1:55 PM wf q (From:SharePoint - Setup, Upgrade, Administration and Operation (pre-SharePoint 2010))
    Tuesday, March 8, 2011 1:42 PM

Answers

  • Hi,

    In OOTB there is no way i think. Create your own Custom Action for SharePoint Designer Workflow.

    check this link for creating custom Action

    http://rmanimaran.wordpress.com/2011/02/17/sharepoint-designer-2007-workflow-creating-custom-action-recycle-item/

    To modify the web.Config you can use SPWebConfigModification class


     


    R.Mani http://rmanimaran.wordpress.com
    • Marked as answer by Emir Liu Wednesday, March 16, 2011 3:13 AM
    Wednesday, March 9, 2011 12:00 PM