Load Server Package Settings into Database
Moderator: Phil Barton
Load Server Package Settings into Database
In the sdk documentation, it discusses using an xml structure to load server package settings into the database through the command line using sps.exe. Does this require every user with the SoftPro Select client application on their machine to do this? Or is this applied one time directly to the server instance, and if so, who would perform this action?
-
- Posts: 23
- Joined: Wed Jul 12, 2023 11:29 am
Re: Load Server Package Settings into Database
This is applied one time on the server. If you you have a server pool it only needs to be done on a single server. This would be done by someone with administrative access to the server, who maintains the Select server and installs packages.
Re: Load Server Package Settings into Database
Do you know if it is possible to test this locally while debugging code?
-
- Posts: 23
- Joined: Wed Jul 12, 2023 11:29 am
Re: Load Server Package Settings into Database
Are you trying to create your own server package?
Re: Load Server Package Settings into Database
Yes, that will be used by customers. I successfully loaded the xml file but I'm not seeing the settings when I run the code in debug mode.
-
- Posts: 23
- Joined: Wed Jul 12, 2023 11:29 am
Re: Load Server Package Settings into Database
You can access the attributes for your server package by getting the IServiceEntry for your package from the IRegistration service, and then accessing the Attribute collection. Here is an example of iterating through all the attributes for a server package.
Code: Select all
IServiceEntry serviceEntry1 = registration.Enum().FirstOrDefault(s => s.ID == new Guid("Guid for the service id from the registration xml"));
foreach (IServiceAttribute att in serviceEntry1.Attributes)
{
string name = att.Name;
string val = att.Value;
}