none
Write data to application variable of SharePoint application RRS feed

  • Question

  • Hi ,

    I have a requirement where i have to write access code data to Application variable of SharePoint.

    And How to get data in application cache for easy access?

    How can i do the above?

    Thanks,

    Pallavi 

    Thursday, December 22, 2016 9:29 AM

Answers

  • Hi,

    Its not best practices to hold up the key/pair value in Application,Session or Cache in SharePoint. Instead you can try the Property Bag (Site Properties , Farm Properties)  or a list.

    Property Bag - Example Code available in this link

    Property Bag Usage in the SharePoint


    Murugesa Pandian | MCPD | MCTS | SharePoint 2010 |

    • Marked as answer by Pallavi G.L Monday, December 26, 2016 6:25 AM
    Thursday, December 22, 2016 1:58 PM
  • Hi Pallavi,

    Any update?

    If Murugesa's reply helps you, please mark the reply as answer, it will make others who stuck with the similar issue easier to search for valid solutions in this forum.

    If you want to store and access data in SharePoint, I suggest you use SharePoint list to achieve it, and set the permission for the list for better management.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by Pallavi G.L Monday, December 26, 2016 6:25 AM
    Monday, December 26, 2016 1:55 AM
    Moderator
  • Hi Dennis,

    Yes SharePoint Property bag or list are some of the options for storing configuration data.

    Based on the requirement developer can chose :

    https://blogs.msdn.microsoft.com/zwsong/2012/03/27/where-should-you-store-your-sharepoint-solutions-configuration-data/ Here the writer has described the pros and cons of the same.

    Thanks,

    Pallavi

    • Marked as answer by Pallavi G.L Monday, December 26, 2016 6:27 AM
    Monday, December 26, 2016 6:27 AM

All replies

  • Hi,

    Its not best practices to hold up the key/pair value in Application,Session or Cache in SharePoint. Instead you can try the Property Bag (Site Properties , Farm Properties)  or a list.

    Property Bag - Example Code available in this link

    Property Bag Usage in the SharePoint


    Murugesa Pandian | MCPD | MCTS | SharePoint 2010 |

    • Marked as answer by Pallavi G.L Monday, December 26, 2016 6:25 AM
    Thursday, December 22, 2016 1:58 PM
  • Hi Pallavi,

    Any update?

    If Murugesa's reply helps you, please mark the reply as answer, it will make others who stuck with the similar issue easier to search for valid solutions in this forum.

    If you want to store and access data in SharePoint, I suggest you use SharePoint list to achieve it, and set the permission for the list for better management.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by Pallavi G.L Monday, December 26, 2016 6:25 AM
    Monday, December 26, 2016 1:55 AM
    Moderator
  • Hi Dennis,

    Yes SharePoint Property bag or list are some of the options for storing configuration data.

    Based on the requirement developer can chose :

    https://blogs.msdn.microsoft.com/zwsong/2012/03/27/where-should-you-store-your-sharepoint-solutions-configuration-data/ Here the writer has described the pros and cons of the same.

    Thanks,

    Pallavi

    • Marked as answer by Pallavi G.L Monday, December 26, 2016 6:27 AM
    Monday, December 26, 2016 6:27 AM