Load Server Package Settings into Database

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
dn_garza
Posts: 25
Joined: Wed Jan 10, 2024 11:16 pm

Load Server Package Settings into Database

Post 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?
PaulMcCullough
Posts: 23
Joined: Wed Jul 12, 2023 11:29 am

Re: Load Server Package Settings into Database

Post 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.
dn_garza
Posts: 25
Joined: Wed Jan 10, 2024 11:16 pm

Re: Load Server Package Settings into Database

Post by dn_garza »

Do you know if it is possible to test this locally while debugging code?
PaulMcCullough
Posts: 23
Joined: Wed Jul 12, 2023 11:29 am

Re: Load Server Package Settings into Database

Post by PaulMcCullough »

Are you trying to create your own server package?
dn_garza
Posts: 25
Joined: Wed Jan 10, 2024 11:16 pm

Re: Load Server Package Settings into Database

Post 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.
PaulMcCullough
Posts: 23
Joined: Wed Jul 12, 2023 11:29 am

Re: Load Server Package Settings into Database

Post 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;
}
Post Reply