Appframe Knowledge Base


1 hits
3

Service list definition

This article is outdated. <WebLogin> service setting is no longer used. To enable web login you should include <add key="ForceRemotingWebLogin" value="true" /> in your web.config.

Service list xml defines Appframe services available in login form. You can define them as built in service list or as a url. Recommended way is to have service list url with fall back service list embeded in login executable. Below is minimal example.

service list xml definition

    Service list minimal definition

Building this project would result in no services defined just (manual), but UseWindowsAuthByDefault and UseLocalization would still be used. If UseWindowsAuthByDefault is set to true then authentication will be set to windows authentication on first lauch. If UseLocalization is set to true, current culture and current UI culture will be set acordingly to UserSession.User.Culture and UserSession.User.UICulture.

You can define multiple Client nodes in your service list xml, but keep in mind that your login builder project name and Client name must match (see first image). This is so we can have single service list xml for multiple clients (like "MarketMaker" and "MarketMaker Dev").

Below we define service list xml with most options.

extended service list xml definition

    Extended service list definition

If you want to preselect specific service on first login launch, make sure DefaultService and Service/Name match. Same goes for FallbackServiceName and Service/Name.

<client> node elements explained below.

  1. <Name> - Should directly map to login executable name. Login executable is named after login builder project name. This is important to get right!
  2. <DefaultService> - Should maps to <service> element <Name> value. When login for suns for the first time (or user session can not be loaded from registry) service defined here will be preselected and used first.
  3. <UseWindowsAuthByDefault> - Accepts "true" or "false" values. When set to "true" and <AuthenticationMode> service setting is not set to SQLServer login form will use windows credentials to log in.
  4. <UseLocalization> - Accepts "true" or "false" values. When set to "true" clinet application will apply culture and culture UI settings based on user settings from manage users.
  5. <DisableSplashScreen> - Accepts "true" or "false" values. Only used when building core launcher. When set to "true" user will not be greeted with regular core launcher splash screen.
  6. <WebLogin> - Accepts "true" or "false" values. When set to "true" user will be greeted with web login form as oposed to built in login screen. To load login screen <RemotingHost> setting will be used. Make sure your remoting works before enabling web login.

<service> node elements explained below.

  1. <Name> - Used to identify service from the list of others. Will be displayed in service selection dropdown.
  2. <ClientName> - Name to be displayer when your main form launches (see no. 2 in image below). Also UserSession.Service.ClientName is filled with that value.
  3. <Server> - Server part in your connection string to connect to your service. Also UserSession.Service.Server is filled with that value.
  4. <Database> - Database or "Initial Catalog" part in your connection string to connect to your service. Also UserSession.Service.Database is filled with that value.
  5. <WebUrl> - Used to fill UserSession.Service.WebUIUrl. that in turn is used when you use CR3.OpenAppframePage(), Web UI Url is also used in password reset and two factor authentication functionality. This url should point to valid Appframe web site.
  6. <RemotingHost> - Used to fill UserSession.Service.RemotingHost. Should point to valid remoting host. Remoting in turn should be able to connect to your sql server instance.
  7. <WinAuthRemotingHost> - Used to fill UserSession.Service.WinAuthRemotingHost. Should point to valid windows authentication remoting host.
  8. <WebAPIHost> - Used to fill UserSession.Service.WebAPIHost. Will be used more in the future.
  9. <MainProjectName> - This form will be opened when login succeds. Should be used when you are using custom "Sys.WinClient.Main" that is maintained by your self.
  10. <ImproveApp> - Used to fill UserSession.Service.ImproveApp. Application that will be opened when you press improve button (see no. 10 in image below).
  11. <DocHost> - Used to fill UserSession.Service.DocHost. This in turn is used to display help page when pressing "Help -> View Help" (see no.11 in image below).
  12. <Responsible> - When reset password fails user will be advised to contact responsible via message box.
  13. <AllowRememberPassword> - Accepts "true" or "false" values. When set to "true" and user logs in, he will be prompted to store password in windows credential store.
  14. <AllowAutoLogin> - Accepts "true" or "false" values. When set to "true" and user checks "auto login" check box when prompted to save password, next time he will be logged in automatically. And he will have to use "File -> Log out" in main form to stop logging in automatically.
  15. <FallbackServiceName> - When supplied should point to any other service name. If this service login fails it then tries switching to fallback service and then tries loggin in again.

    When <WebLogin> is set to "true" <FallbackServiceName> functionality will no longer work. To fall back to regular login when web login is enabled hold [Ctrl] + [Alt] when launching client.

  16. <AuthenticationMode> - can be set to "SQLServer" or "IntegratedSecurity". Using this setting will override <UseWindowsAuthByDefault> setting, and will be used per service. This setting should be used together with <FallbackServiceName> to enable fallback to differnt authentication mode.

  17. <LoginProjectName> - used by core launcher. That is the application name (from Win Projects) that will be launched by core launcher. If setting is not present defaults to "App.WinClient.Login". When this setting is present and building "Sys login to app login" that name will be used when preparing project to be inserted as Win Project.

Below is the picture showing how values form service list xml flow to actual usages.

complete picture

    Service list xml value flow.

  • Edited on #2016-05-12# (client node elements explained, web login description)
  • Edited on #2016-06-13# (added missing AuthenticationMode setting description)
  • Edited on #2016-06-15# (added missing LoginProjectName setting description)

Login ServicesXml · Perma link post comment Posted by: Tomas Dambrauskas (02-feb-2016)