Prerequisites
ASP.NET Core Runtime 8.
Installation procedure
- If not already present, download and install the ASP.NET Core Runtime 8 from the official Microsoft website. Download the "Hosting Bundle" setup if planning on serving the API via Microsoft Internet Information Services;
- Download the Style API package (MSoft.Style.Service.zip) from your profile on our website;
- Unzip the contents to a desired directory. If you are going to serve it via IIS, we recommend unzipping to C:/inetpub/www/MSoft.Style.Service/;
- Run the application as a standalone application via MSoft.Style.Service.exe. It will start listening at http://localhost:5000/;
- Open the address in a browser and use the graphical interface to set the database connection settings;
- Once the database settings are saved and the application is working correctly, you can install it as a Windows Service or host it via IIS.
Running as a standalone application or a Windows service (recommended for development/testing)
Running the application this way will use the Kestrel web server in ASP.NET Core. Changing the listening port, HTTPS certificates, etc. requires manual configuration via the appsettings.user.json. More information on Kestrel configuration here.
To use the API from external machine, you need to:
- Configure Kestrel to listen on all interfaces. Example appsettings.user.json snippet to enable remote connections on port 5000:
"Kestrel":{Endpoints":{"MyHttpEndpoint":{"Url":"http://0.0.0.0:5000"}}}
- Allow the application through the firewall;
- If running as a Windows service, configure it to use an account that has network access.
You can use the provided WindowsService-Install.bat file in the application's directory, to install it as a Windows service.
Hosting via Microsoft Internet Information Services (recommended for production)
The application is served as a standard ASP.NET web application.
- In IIS Manager, create a new website or a virtual application and set the physical path to the folder from step 3 of Installation procedure;
- Make the desired binding (ports/certificates) settings;
- Make sure only anonymous authentication is enabled;
- Make note of the identity of the application pool in which the application is running (default identity is "IIS AppPool\[application name]") and see Folder permissions.
Folder permissions
The application needs modify permissions on its folder. Make sure to give permissions to the correct user, e.g. when running as a Windows service or an IIS web application.