SharePoint 2010 Forms Based Authentication Configuration Manager


I found myself getting really tired of constantly modifying configuration files when setting up forms based auth (FBA) in SharePoint 2010.  There's even more work now then there was in the previous release, because now we have an additional web.config file to modify – for the STS.  It was also a constant hassle when you fat finger some random part of a web.config change.  So, rather than continuing to complain about it, I wrote this little tool to help manage it for you.  You should read through the complete HowToUseIt.txt file that's included in the zip attached to this posting, but basically it allows you to create the entries for membership provider, role provider, wildcard search and connection string and push it out to all of the servers in your farm.  You can also read in the configuration settings from a web application and modify them, then push it back out to the same server, or use it as the basis of settings for a brand new server.  To get you started, I also include several sample membership and role provider configuration entries.  Just select the samples drop down and pick the item you want to create an entry for.  Modify the entry to suite your environment, provide the Url to the web application where the configuration changes should be made, and click the Apply Config button.  Under the covers it creates a custom SharePoint timer job that runs on each web front end and modifies the appropriate web.config file with the appropriate entries.  The timer job is part of a solution (wsp) that's included in the attachment – make sure you deploy it to the farm first before doing anything else.

I STRONGLY encourage you to make a backup of your central admin, STS, and web application web.config files before pushing out changes in case something happens you don't like.  I've tested this on quite a few web applications and in single server and multi-server farms so far without problems, but you never know.

It's already saved me a lot of time and hassle, hope it provides some value for you too.

 

UPDATE 6/15/2012:  I finally reproduced the error about node belonging to a different document context, and have fixed that.  A new build with that fix is attached.  Thanks for those of you that reported it.

FBAConfigMgr.zip

Comments (29)

  1. hassan sayed issa20014 says:

    thanks

  2. hassan sayed issa20014 says:

    thanks

  3. alexandrad9x says:

    http://dichvuketoanlongbien.com/
    http://dichvuketoanlongbien.com/a2-96-dich-vu-ke-toan-tron-goi.html
    http://dichvuketoanlongbien.com/a2-98-dich-vu-ke-toan-thue.html
    http://dichvuketoanlongbien.com/a2-103-dich-vu-bao-cao-tai-chinh.html
    http://dichvuketoanlongbien.com/a2-97-dich-vu-quyet-toan-thue.html
    http://dichvuketoanlongbien.com/a2-114-dich-vu-ke-toan-tai-29-quan-huyen.html
    http://dichvuketoanlongbien.com/i780-dich-vu-ke-toan-thue-tron-goi-tai-bac-ninh.html
    http://dichvuketoanlongbien.com/i779-dich-vu-ke-toan-thue-tron-goi-tai-bac-giang.html
    http://dichvuketoanlongbien.com/i778-dich-vu-ke-toan-thue-tron-goi-tai-phu-tho.html
    http://dichvuketoanlongbien.com/i781-dich-vu-ke-toan-thue-tron-goi-tai-hung-yen.html
    http://dichvuketoanlongbien.com/i782-dich-vu-ke-toan-thue-tron-goi-tai-vinh-phuc.html
    http://dichvuketoanlongbien.com/i783-dich-vu-ke-toan-thue-tron-goi-tai-hai-phong.html
    http://www.trungtamketoan.com.vn/
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-ha-noi.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-tp-hcm.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-quang-ninh.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-hai-duong.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-bac-giang.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-bac-ninh.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-hai-phong.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-nam-dinh.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-thai-binh.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-thanh-hoa.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-vinh-phuc.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-hung-yen.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-phu-tho.html
    http://www.trungtamketoan.com.vn/p/trung-tam-dao-tao-ke-toan-tai-binh-duong.html
    http://www.tosvn.com
    http://iketoan247.blogspot.com
    http://tailieuveketoan.blogspot.com
    http://mauhinhnendep.blogspot.com
    http://www.tosvn.com/search/label/Hack%20CF
    http://www.tosvn.com/search/label/Hack%20AvatarStar
    http://www.tosvn.com/search/label/Hack%20Warcraft-Dota2
    http://www.tosvn.com/2014/12/hack-truy-kich-mien-phi-hack-truy-kich.html
    http://iketoan247.blogspot.com/search/label/thong-tin-kinh-te
    http://iketoan247.blogspot.com/search/label/tin-bai-ve-thue
    http://hoclamketoan.edu.vn/
    http://hoclamketoan.edu.vn/category/khoa-hoc-ke-toan
    http://hoclamketoan.edu.vn/category/dich-vu-ke-toan
    http://hoclamketoan.edu.vn/category/hoc-lam-ke-toan
    http://hoclamketoan.edu.vn/category/tai-lieu-ke-toan
    http://hocketoan360.com/
    http://hocketoan360.com/category/khoa-hoc-ke-toan/
    http://hocketoan360.com/category/dich-vu-ke-toan/
    http://hocketoan360.com/category/tai-lieu-ke-toan/
    http://me.zing.vn/zb/u/htdung2281990
    http://me.zing.vn/zb/c/htdung2281990/6594341
    http://me.zing.vn/zb/c/htdung2281990/1

  4. Release forms says:

    Yes this is the same issue am facing,, if you get any solution please mail me. I am with this problem from 2 days..thanks

  5. cash says:

    It sounds very interesting to me. I agree with you form based authentication was way easier to set up in SharePoint 2007 then it is in 2010.

    I have to try this out and will come back to you with a feedback.

    Appreciate your effort for the community.

    Cheers!

    Cash

  6. Thank you! This is just the sort of tool I've been looking for right now too.

    Best Regards,

    Lou

  7. I am experiencing the following problem – the web.config files are modified, but only "Connection String" and "People Picker Wildcard" sections are added. The "Membership Provider" and "Role Provider" textboxes are filled, but these values appear in no web.config file.

    Do you have any idea what can cause such a problem?

  8. Philip says:

    Fantastic.  FBA web.config files are burning out the back of my skull

    cheers

  9. Phillip Marcuson says:

    Outstanding…. This worked perfectly in my environment with custom membership and  role providers.  Thank you so much!

  10. Great Tool says:

    fixed my error, mind I am sitting here thinking its 2010 and we are still manipulating great long strings even if they are xml files

  11. Merill Fernando says:

    Any chance you can release the source code?

    Thanks

  12. Merill Fernando says:

    I've been inspired by this and created a slightly different version which directly updates the config files and is scriptable from Powershell.

    It's available on CodePlex: fbaconfigmanager.codeplex.com

  13. james says:

    NewBie Question. Can you pls be more verbose on how to deploy the FBAConfigFeature.wsp application? When I follow the instructions verbatim powershell throws an exception saying ..

    "The term 'add-spsolution' is not recognized as the name of a cmdlet" … Any help??

  14. All Servers In Farm says:

    I second the need for source code!! Merill, yours is great but it doesn't seem to apply the changes on every server in the farm. Looking in Reflector, this tool seems to use an SPJobDefinition to deploy the changes, does that work when you add a new server to the farm or do you have to re-deploy the Job??

  15. xiangwenhu says:

    Could you send me the source code!  Thanks very much.

  16. XiangwenHu says:

    Could you send me the source code!  Thanks very much.

    My Email is : Xiangwenhu@hotmail.com

  17. MaximD. says:

    Hi.

    Nice work

    However there is one problem for the case when a target config file does not have system.web/membership section defined – this will cause an error that will prevent the config file from being updated…

    That's what I have encountered and that's a pity there are no sources provided

    Thanks

  18. MaximD. says:

    Some details on the error I described above.

    The error occurs only for STS web.config (since only in this case system.web,providers etc nodes are pre created) and the message is

    The node to be inserted is from a different document context

    Seems it's quite easy to fix

    Hope it helps someone

  19. aru says:

    <a href="j2me-aspnet.blogspot.com/" rel="nofollow">Its really very helpful information Thanks</a></p>

    <br /> <br /><br />

  20. Bijay says:

    I want to configure with Oracle database. Can you provide me some clue to do that.

  21. Urs says:

    Hi Steve,

    great tool!

    One comment, though: I used the provided SQL-Membership Provider example and there is a linebreak in the template. This linebreak is written to the web.config files as '&#xD;&#xA;'. No big deal here, but you could perhaps erase this inside the template.

    Regard, Urs

  22. guy says:

    Fresh out of the box with Pristine web.config files (except that I specified FBA and a name of the FBA Section)… — it pulls pack a null reference — .. Would have been nice… I don't have time to screw around – picking another solution…

  23. Hammad says:

    Can you please share the code of this??

  24. Anonymous says:

    Nothing really earth shattering here – the previous version of FBA Configuration Manager for SharePoint

  25. Anonymous says:

    Nothing really earth shattering here – the previous version of FBA Configuration Manager for SharePoint

  26. Anonymous says:

    Nothing really earth shattering here – the previous version of FBA Configuration Manager for SharePoint

  27. Anonymous says:

    Nothing really earth shattering here – the previous version of FBA Configuration Manager for SharePoint

  28. m88 says:

    Modern Thai restaurant combines outstanding traditional cuisine and a subtle modern decor with a warm welcoming ambience. Thai Restaurants in Brisbane :
    http://www.watersidethainoodles.com.au , traveller reviews of Brisbane Thai restaurants and search by price, location, and more..

    m88 : http://m88en.com
    M88.com offer online sports games Asia, Sports Betting Asia, Sports Betting Sites Asia.

    m88asia : http://m88en.net m88asia
    Link to M88BET phone: m88en.com. – Register and Open Betting Account and Membership M88BET.

    m88bet : http://www.linkm88vip.com
    MANSION88 the house is one of the largest and most prestigious. Appeared quite early in the Asian market, the so-MANSION88 currently attracts more players.

    link m88 : http://m88wiki.com m88casino
    Home the M88 is the official sponsor of the football club in the Premier League
    Wish you happy with the new M88
    m88 casino online : http://m88free.com m88online

  29. Anonymous says:

    Nothing really earth shattering here – the previous version of FBA Configuration Manager for SharePoint