Table of contents
KissLog.Backend.AspNetCore.zip
KissLog.Frontend.AspNetCore.zip
Artifacts can be downloaded from here.
IIS Web server with NET Core 3.1 Runtime installed
MongoDB Community Server (version >= 4.2.x)
For instructions installing MongoDB server, please check the official tutorial.
We will not cover the installation guide for these services. There is a high possibility that the existing server will already have a running instance of MySQL or MS-SQL server.
On the machine hosting the IIS server, install .NET Core 3.1 Runtime
Create two IIS applications:
KissLog.Backend
KissLog.Frontend
Update the Application Pool settings for both of the applications to the following:
KissLogFrontend |
KissLog.Backend |
---|---|
![]() |
![]() |
Copy into each IIS application folder the corresponding deploy package
KissLogFrontend |
KissLog.Backend |
---|---|
Example: C:\inetpub\wwwroot\KissLog.Frontend ![]() |
Example: C:\inetpub\wwwroot\KissLog.Backend ![]() |
On the first deployment you need to update the required configuration options.
The configuration file for each application (KissLog.Frontend and KissLog.Backend) is located under Configuration\KissLog.json
.
Replace the following mandatory properties with corresponding values:
{
"KissLogBackendUrl": "http://my.kisslog-backend.com",
"KissLogFrontendUrl": "http://my.kisslog-frontend.com",
"Database": {
"Provider": "MongoDb",
"MongoDb": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "KissLog"
},
"AzureCosmosDb": {
"AccountEndpoint": "https://my-cosmosdb.documents.azure.com:443/",
"AccountKey": "A889wNrmGpCmScnZcVr2SprEUHCvUz74rVZgeYyXQyGt9PPW2NBNDwpJauXdmAEUZtdHJ4MVjVM92T5kNg53VB==",
"DatabaseName": "KissLog"
}
}
}
Description |
|
---|---|
KissLogBackendUrl |
Url pointing to KissLog.Backend application |
KissLogFrontendUrl |
Url pointing to KissLog.Frontend application |
Database.Provider |
Possible values: MongoDb, AzureCosmosDb |
Database.MongoDb { } |
Required if Database.Provider = MongoDb |
Database.AzureCosmosDb { } |
Required if Database.Provider = AzureCosmosDb |
Replace the following mandatory properties with corresponding values:
{
"KissLogBackendUrl": "http://my.kisslog-backend.com",
"KissLogFrontendUrl": "http://my.kisslog-frontend.com",
"Database": {
"Provider": "SqlServer",
"KissLogDbContext": "Data Source=192.168.16.11;Initial Catalog=KissLog_Frontend;UID={_username_};PWD={_password_};"
}
}
Description |
|
---|---|
KissLogBackendUrl |
Url pointing to KissLog.Backend application |
KissLogFrontendUrl |
Url pointing to KissLog.Frontend application |
Database.Provider |
Possible values: SqlServer, MySql |
Database.KissLogDbContext |
Database connection string |
After the configuration files have been updated, you can run the applications.
The initial startup will bootstrap all the necessary components including MongoDB and SQL databases.
Startup logs (including errors) will be generated under Logs
folder:
C:\inetpub\wwwroot\KissLog.Backend\Logs
C:\inetpub\wwwroot\KissLog.Frontend\Logs
Make a single request to KissLog.Backend root URL (”http://kisslog-backend.myapp.com”)
If the startup process went successful, a 200 OK "Running"
response will be returned.
Make a single request to the KissLog.Frontend root URL (”http://kisslog.myapp.com”).
If the startup process went successful, you will see the home page.
To login, you must create a JWT token signed with the secret provided under Authorization\HS256Secret
property from KissLog.Frontend\Configuration\KissLog.json
file.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZGV2ZWxvcGVyIn0.DF98byyHSWMhsPAarLEwJpFzgrt7CojlleRZAbOlqp4
Startup logs (including errors) will be available under \Logs
folder. Here should be the first place to check.
C:\inetpub\wwwroot\KissLog.Backend\Logs
C:\inetpub\wwwroot\KissLog.Frontend\Logs
Make sure you deploy and run KissLog.Backend first
If there are any confiuguration errors, you should see them under the \Logs
folder.
KissLog.Backend will try to connect to MongoDB. If the MongoDB server is not reachable, you should see an error:
KissLog.Backend startup failed
DatabaseName: KissLogBackend
Exception: A timeout occured after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : "1", ConnectionMode : "Automatic", Type : "Unknown", State : "Disconnected", Servers : [{ ServerId: "{ ClusterId : 1, EndPoint : "Unspecified/localhost3:27017" }", EndPoint: "Unspecified/localhost:27017", ReasonChanged: "Heartbeat", State: "Disconnected", ServerVersion: , TopologyVersion: , Type: "Unknown", HeartbeatException: "MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server.
---> System.Net.Sockets.SocketException (11001): No such host is known.
\Logs
folder.Important:
KissLog.Frontend\Logs\CreateDatabaseScript.txt
.web.config
, set <aspNetCore stdoutLogEnabled="true" />
, then restart the application.<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\KissLog.Backend.AspNetCore.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
<!--ProjectGuid: 4EC40754-6618-4D7D-B45E-C7FE1D6B8EF6-->
Important:
Create an empty Logs
folder if one does not already exist.
Open a GitHub issue or send an email to catalingavan@gmail.com.