Page 1 of 1

Load Server Package Settings into Database

Posted: Mon Jan 22, 2024 4:05 pm
by dn_garza
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?

Re: Load Server Package Settings into Database

Posted: Tue Jan 23, 2024 10:56 am
by PaulMcCullough
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

Posted: Fri Jan 26, 2024 1:27 am
by dn_garza
Do you know if it is possible to test this locally while debugging code?

Re: Load Server Package Settings into Database

Posted: Fri Jan 26, 2024 5:00 pm
by PaulMcCullough
Are you trying to create your own server package?

Re: Load Server Package Settings into Database

Posted: Sat Jan 27, 2024 2:47 am
by dn_garza
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.

Re: Load Server Package Settings into Database

Posted: Mon Jan 29, 2024 8:55 pm
by PaulMcCullough
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;
}