Starcounter
HomeDownloadDocsCommunity
2.3.2
2.3.2
  • Starcounter Documentation
  • Getting Started
  • Starcounter
    • Collapsing the Stack
      • Complexity and Scalability Tradeoff
      • The Future of Micro-Services
      • 10 Benefits of Collapsing the Stack
    • Integrated Database and Web Server
  • Hello World - Tutorial
    • Create a Database Class
    • Create a Real Time UI
    • First Interactive UI
    • Computed Properties
    • Expense Tracker
    • Cancel and Delete
    • The Next Step
  • Guides
    • Database
      • Database Classes
      • Data manipulation
      • Object Identity and Object References
      • Querying with SQL
      • Data Types
      • Relations
      • Inheritance
      • Sharing data
      • Database Configuration
      • Comparing Database Objects
      • Referential Integrity and Constraints
    • SQL
      • Identifiers
      • Path Expressions
      • Data operators
      • Joins
      • Aggregates
      • Comparisons and Logical Operators
      • Sorting
      • Fetch
      • Offset Key
      • Indexes
      • Literals
      • Query Plan Hints
      • Reserved words
      • Query for Database Classes
      • SQL Isolation Between Applications
    • Transactions
      • Short-Running Transactions
      • Long running transactions
      • Using Transactions
      • Running Background Jobs
      • Commit Hooks
      • Post-commit hooks
    • Typed JSON
      • JSON-by-example
      • Code-Behind
      • Data Bindings
      • Callback Methods
      • Responding with JSON
      • Accepting JSON in Requests
      • Primitive Arrays and Single Value Types
      • Typed JSON Internals
    • Blendable Web Apps
      • Starcounter MVVM
      • Palindrom
      • Client-Side Stack
      • Sessions
      • HTML Views
      • App Shell
      • Web Components
      • View Attaching
      • View Composing
      • HTML Compositions
      • HTML Views Blending Guidelines
      • Avoiding CSS conflicts
      • Debugging
    • Network
      • HTTP
      • Internal Self Calls
      • Middleware
      • Anonymous or Substitute Handlers
      • URL Aliases and Redirects
      • Network Gateway
      • Static File Server
      • WebSocket
      • Avoiding URI conflicts
      • TCP Sockets
      • UDP Sockets
    • Publishing Apps
    • Working with Starcounter
      • Release Channels
      • Installation
      • Starting and Stopping Apps
      • Administrator Web UI
      • Star CLI
      • StarAdmin CLI
      • StarDump CLI
      • Working in Visual Studio
      • Error Log
      • Using HTTPS on NGINX
      • Using HTTPS on IIS
      • Run Starcounter in Production
      • Weaver
      • Investigating App Crashes
      • Configuration Structure
      • Database Refactoring
      • Using Unload/Reload to Modify Database Schema
      • Kernel Questions and Answers
      • Log Files
  • Cookbook
    • Attach an HTTP Request to an Existing Long-Running Transaction
    • Cookie-Based Authentication
    • Timestamp on Object Creation
    • Creating Strongly Typed JSON Collections
    • Migrating From 2.2 to 2.3+
    • Multiple Pages
    • Icons
    • Proposed Project Structure
    • Acceptance Testing with Selenium
    • Requesting a User to Authenticate
    • How to delete unused tables and columns
Powered by GitBook
On this page
  • Introduction
  • Established Directories on Installation
  • Installation Directory
  • Server Repository
  • The Server Configuration File
  • Database Configuration Files
  1. Guides
  2. Working with Starcounter

Configuration Structure

Introduction

In this page, it's described how the Starcounter configuration structure looks after downloading Starcounter 2.3 and where to find the essential directories and configuration files.

Established Directories on Installation

The Starcounter installer establishes two directories: the installation directory and the server repository.

The paths of these can be customized on installation. By default they are:

  • Installation directory: %ProgramFiles%\Starcounter

  • Server repository: %UserProfile%\Documents\Starcounter\Personal

Installation Directory

All Starcounter binaries are stored under the installation directory. This includes:

  • Tools such as star.exe, staradmin.exe and, starpack.exe

  • Public reference assemblies, specifically Starcounter.dll

  • Internal runtime libraries (native and managed)

  • Supportive executables, such as the gateway executable and the data manager executable

How to Find the Installation Directory

As part of installing, we populate an environment variable with the path to the installation directory. It can easily be viewed from a prompt doing:

C:\Users\Per>set StarcounterBin
StarcounterBin=C:\Program Files\Starcounter

Server Repository

This directory store configurations concerning each database. At the root of it is the server configuration file. This file is consumed by Starcounter to find additional configurations. Currently, all configurations are in XML format.

How to find the server repository

In the installation directory, we store a file (Personal.xml) under the Configuration folder:

\Program Files\Starcounter
  \Configuration\
    Personal.xml

The XML-path service\server-dir in this file will reveal the path to the server repository:

<?xml version="1.0" encoding="UTF-8"?>
<service>
  <server-dir>C:\Users\Per\Documents\Starcounter\Personal</server-dir>
</service>

The Server Configuration File

The server configuration file is called Personal.server.config. At the root is the Server node. Some of the more important elements are:

Database directory: The directory where we look for the configuration describing each database. Default value: %ServerRepo%\Databases.

LogDirectory: The directory where we write all event logs to. Normally accessed by the user in the Web Administrator "Logs" tab. Default value: %ServerRepo%\Logs.

TempDirectory: The directory used by us when storing temporary data. Should normally be OK to delete all content from. Default value: %ServerRepo%\Temp.

SystemHttpPort: The port we expose the Web Adminstrator on. Can be customized in the installer. Default:8181.

DefaultDatabaseConfiguration: Default configuration values we use when a new database is created. Customizing this allow a user to fine tune defaults for all future databases.

Example file (trimmed and simplified):

Database Configuration Files

Each database is described by a configuration file. Starcounter will look for such files in the DatabaseDirectory as specified in the server configuration file (see above). For a database configuration file to be recognized, it must be stored in a directory that has the name of that database. The file itself must use a pattern using the same name.

Example of two configured files:

\Databases\
  Default\
    Default.db.config
  Northwind\
    Northwind.db.config

The root of each database configuration file is the Database node. Here are the more important elements:

ImageDirectory: The directory where the main database data files reside. Default value: %ServerConfigFile%\DefaultDatabaseConfiguration\Runtime\ImageDirectory. At the time of creation, Starcounter will add a unique string to the end of that path before creating files.

TransactionLogDirectory: The directory where transaction logs are stored. Default value: same principle as ImageDirectory applies.

DefaultUserHttpPort: The port used for handlers registered in user code, if no port is explicitly given: Default:8080.

Example file (trimmed and simplified):

PreviousInvestigating App CrashesNextDatabase Refactoring

Last updated 7 years ago