I need to save some settings in sharepoint and i could access the datas from any webapplications. Shall i go for configuration database or is there any other option.
its better to go for a Custom List to save any settings regarding your project/assignment. Its not the best idea to manually query/change the configuration database. Take a look at how to create a custom list with content types. Or the other option is to go for property bags regarding the general settings for the project!
I would suggest to use property bag to store settings for details see the link attached
http://msdn.microsoft.com/en-us/library/ff798491.aspx
http://spg.codeplex.com/wikipage?title=Design%20of%20the%20Configuration%20Manager&version=3
Related
I am developing SharePoint framework Extensions and need to store settings json file which can be configured anytime by admin/privilege person.(such as a component layout settings/app settings).
What is the best way to store such a settings file without storing database ?
for example - I could create json file when app is starting first time and retrieve the file data next time onwards.
is there any better solution ?
I will make an assumption that it will be used in SharePoint.
If it was me, I would suggest using a SharePoint list to hold your settings as this provides an easy way for an admin to change your applications settings using the SharePoint UI rather than having to potentially download the JSON fike, edit and and then upload back into SharePoint.
Depending on how the settings need to be stored, are they global? Or scoped to a site collection? Will give you an idea of where the settings need to be stored.
If the settings are global then use a Tenant Property to configure where your app should load the settings from.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/tenant-properties
My thoughts.
I want to backup the design of my graylog dashboard and specific widgets. Where does graylog store them?
It is stored in mongodb. You can have a look at the architecture here
Here there is a link to the detailed architecture. look at the 8th slide. It shows that all the metadata related to dashboards are stored in mongodb
Hope this helps
Best way to backup dashboard is to use Content Pack. Create your own content pack select desired dashboards, and it will create json extract, which you can use as backup. You can than use content pack to import dashboard to same or another instance of graylog.
https://docs.graylog.org/en/3.3/pages/content_packs.html
I have an XPages Library database where all my XPages are created. From there users will access other databases to do their work.
I need to put the names of those databases in variables so they can be found on any server (development, test, production, etc.) since the names are always the same. I think that those variables should be applicationScope variables but I am not sure.
If applicationScope in the variable that I need, can you tell me where is the best place to create them.
If it is not the right variable, which kind of variable will be the best and where do I define them.
An easy way to deploy some static references is the xsp.properties file. This file allows to add variables which are accessable on all XPages applications on the server
For example this variable...
myproperty.test=Hello World
... can be accessed in any XPage this way:
context.getProperty("myproperty.test")
These properties can be set by a theme too.
But the property has to be added to any server manually.
Another way is to use configuration documents: These can easily deployed by the replication mechanism to any database on any server. The value of these documents can be cached in applicationScope variables for a better performance.
EDIT:
You should alter the XSP.properties file on the server, not the database specific One. This does not require a Designer, only a text Editor is required.
applicationScope variables stay in memory about 10-15 minutes and are discarded after that. If I understood your need correctly, you should store the database names or URLs permanently and Notes documents would be the best fit for that.
The disadvantage of putting the values into a.properties file is that you need a designer Client to make changes.
I would suggest to use a global configuration document for your application that can be edited either in the client or using an XPage.
Take a look into the xhelp application by Paul Withers. Dig into the code to see how you can use a configuration document in your application. XHelp can be donloaded from here http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&documentId=426CB81230B6F94A8625789000830762
I think because you are talking about a portal like application that it would be best to have a settings document implementation. You have to create an admin xpage which will check if there will be a document of a certain type in the lookupsettingsview ( you have to create this yourself ofcourse ). If there is none create the document. If there is one use the document as the datasource.
On this document you can store the replication id's and server information about the applications you want to display. This can be a simple form with a multiline text field on it. The data could be stored in a format like "Description$repid$server". On the web you have to check for this document, read the entries in the document using a repeat. For each iteration you can just use a xp:link tag. Ofcourse you first need to compute the url of the applications but that's not the biggest issue here.
I am making a Sharepoint 2010 WebPart with functionality from another Main Web Application.
To develop the Webpart quickly I have imported the business logic assemblies used in the Main Web Application. The Webpart works and pulls application specific configuration information from the Sharepoint web.config file.
Is this the best place to store this information?
If not..
Where/How should the application specific configuration data be stored in Sharepoint?
The config data contains items like locations of web services etc. The data will only need to be edited by system administrators.
Thanks
Web.Config is, IMHO, a terrible place to store this sort of config information - its hard to deploy and hard to change, especially if you're using multiple web front ends.
The recommended way to do this is to use PropertyBag (key/value pairs) through the .Properties of SPFarm, SPWeb.RootWeb (for site collections), SPWeb, SPList etc (depending upon the scope that you need).
MSDN - Managing Custom Configuration Options for a SharePoint Application
There is a production ready code available as part of the
MSDN - The SharePoint Guidance Library
See Hierarchical configuration manager
This gives you programmatic access to read/write these values. If you want to do this without using the guidance library then you would use something like the following code.
SPWeb web = SPContext.Current.Web;
if (web.Properties.ContainsKey("MyProperty"))
string myProperty = web.Properties["MyProperty"];
If you want a UI to allow admins to easily set the values then use something like SharePoint Property Bag Settings
The easiest way to do it is to create sharepoint list visible only to administrator. It can have 3 columns description, title, value. It will store all config values. Also you can add a link to this list to site settings page.
The web config is always a good place. However if you want to change that data you will have to enforce some sort of site recompile which is a pain for end users.
Theres a nice little app/solution on codeplex to do with the property bag value
http://pbs.codeplex.com/
This is a brilliant little app/solution that ties in with your central administration.
It should be inbuilt i think.
Hope this helps.
I am currently writing a Sharepoint Workflow that is activated when a user saves an Excel file to a Library. Now I need to process this file and store certain information to a certain list.
Whats the best way to store configuration settings like the name of the output list, names of the Excel columns that the Workflow needs to process, etc?
I understand that there seem to be a lot of different possible solutions like web config, Properties, etc. But since I am totally new to Sharepoint, I cannot properly assess these methods. Which one is the easiest for me to use?
Thank you.
Edit: A Visual Studio Workflow, written in C#
This article is a good starting point Six Ways to to store settings in SharePoint but personally I would be following the MSDN SharePoint Guidance Library which uses the Property Bag storage for their implementation of a hierarchical Configuration Manager which allows you to do things like a farm wide setting but overridden for certain site collections/sites/lists etc.