IIS Deployment Platform Installation
This guide serves as a walkthrough of how to deploy v5 on IIS.

Table of Contents

Overview and Prerequisites

Cinchy version 5 on IIS comes bundled with common components such as Connections, Meta Forms, and the Event Listener. This page details the configuration and deployment instructions for the Cinchy Platform, including SSO. Click on the links below to be taken to the appropriate pages for other components:
Ensure that you review the prerequisites listed here prior to performing an IIS Deployment, including downloading all necessary artifacts.

1. Create a Database

  1. 1.
    On your SQL Server 2012+ instance, create a new database named Cinchy (or any other name you prefer).
    1. 1.
      If you choose an alternate name, in the remaining instructions wherever the database name is referenced, replace the word Cinchy with the name you chose.
  2. 2.
    A single user account with db_owner privileges is required for the Cinchy application to connect to the database. If you choose to use Windows Authentication instead of SQL Server Authentication, the account that is granted access must be the same account under which the IIS Application Pool runs.

2. Create an IIS Application Pool

  1. 1.
    On the Windows Server machine, launch an instance of PowerShell as Administrator.
  2. 2.
    Run the below commands to create the application pool and set its properties.
1
Import-Module WebAdministration
2
$applicationPoolNameSSO="CinchySSO"
3
$applicationPoolNameWeb="CinchyWeb"
4
New-WebAppPool -Name $applicationPoolNameSSO
5
$appPath = "IIS:\AppPools\"+ $applicationPoolNameSSO
6
$appPool = Get-IISAppPool $applicationPoolNameSSO
7
$appPool.managedRuntimeVersion = ""
8
Set-ItemProperty -Path $appPath -Name managedRuntimeVersion $appPool.managedRuntimeVersion
9
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameSSO" -Name Recycling.periodicRestart.time -Value 0.00:00:00
10
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameSSO" -Name ProcessModel.idleTimeout -Value 1.05:00:00
11
New-WebAppPool -Name $applicationPoolNameWeb
12
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameWeb" -Name Recycling.periodicRestart.time -Value 0.00:00:00
13
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameWeb" -Name ProcessModel.idleTimeout -Value 1.05:00:00
Copied!
3. If you chose to use Windows Authentication in the database or want to run the application under a different user account, execute the below commands to change the application pool identity.
1
$credentials = (Get-Credential -Message "Please enter the Login credentials including your Domain Name").GetNetworkCredential()
2
$userName = $credentials.Domain + '\' + $credentials.UserName
3
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameWeb" -name processModel.identityType -Value SpecificUser
4
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameWeb" -name processModel.userName -Value $username
5
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameWeb" -name processModel.password -Value $credentials.Password
6
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameSSO" -name processModel.identityType -Value SpecificUser
7
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameSSO" -name processModel.userName -Value $username
8
Set-ItemProperty "IIS:\AppPools\$applicationPoolNameSSO" -name processModel.password -Value $credentials.Password
Copied!
You may use an alternate application pool name (i.e. instead of Cinchy) if you prefer.

3. Create the Application Directories

  1. 1.
    Unzip the application package on your C drive. This will create 2 directories, C:\Cinchy and C:\CinchySSO. Ensure your application pool accounts has read and execute access to these directories (default accounts are IIS AppPool\CinchyWeb and IIS AppPool\CinchySSO).
  2. 2.
    Run the below commands in the Administrator instance of PowerShell to create directories for the application logs. Ensure your application pool account has write access to these directories.
1
md C:\CinchyLogs\Cinchy
2
md C:\CinchyLogs\CinchySSO
3
md C:\CinchyErrors
Copied!

4. Update the CinchySSO appsettings.json

  1. 1.
    Open the C:\CinchySSO\appsettings.json file in a text editor and update the values below.

4.1 Config Settings

App Settings

1. Under AppSettings section, update the values outlined in the table.
2. Wherever you see <base url> in the value, replace this with the actual protocol (i.e. http or https) and the domain name (or ip address) you plan to use.
Ex:. if you're using https with the domain app.cinchy.co, then <base url> should be replaced with https://app.cinchy.co
Key
Value
CinchyLoginRedirectUri
<base url>/Cinchy/Account/LoginRedirect
CinchyPostLogoutRedirectUri
<base url>/Cinchy
CertificatePath
C:\CinchySSO\cinchyidentitysrv.pfx
StsPublicOriginUri
Base URL used by the .well-known discovery. If left blank will match the request URL.
<base url>/cinchysso
IssuerUrl
The URL of the issuer. This value defaults to the StsPublicOriginUrl and will be used as the issuer of tokens issued by CinchySSO.
<base url>/cinchysso
CinchyAccessTokenLifetime
Duration for the Cinchy Access Token. This determines how long a user can be inactive until they need to re-enter their credentials. It defaults to "0.00:30:00"
4.18.0+ includes session expiration based on the CinchyAccessTokenLifetime. So for the default of "0.00:30:00", this means that if you have been inactive in Cinchy for 30 minutes, your session will expire and you will need to log in again.

Below values are only required for SSO, otherwise leave them as blank

Key
Value
SAMLClientEntityId
Client Entity Id
SAMLIDPEntityId
Identity Provider Entity Id
SAMLMetadataXmlPath
Identity Provider metadata XML file path
SAMLSSOServiceURL
Configure service endpoint for SAML authentication
AcsURLModule
This parameter is needs to be configured as per your SAML ACS URL. For example, if your ACS URL looks like this - "https:///CinchySSO/identity/AuthServices/Acs", then the value of this parameter should be "/identity/AuthServices"

4.2 Connection String

In order for the application to connect to the database, the "SqlServer" value needs to be set.
  1. 1.
    Find the value under the "ConnectionStrings" section:
    1
    "SqlServer" : ""
    Copied!
  2. 2.
    If you're using SQL Server Authentication you can use the below as a reference and update the Server, User Id, and Password properties. If you chose a different database name earlier, you'll need to update that as well.
    1
    "SqlServer" : "Server=MyServer;Database=Cinchy;User ID=cinchy;Password=password;Trusted_Connection=False;Connection Timeout=30;Min Pool Size=10;"
    Copied!
  3. 3.
    If you're using Windows Authentication, then use the below as a reference and update the Server property (and Database if required).
    1
    "SqlServer" : "Server=MyServer;Database=Cinchy;Trusted_Connection=True;Connection Timeout=30;Min Pool Size=10;"
    Copied!

4.3 External Identity Claim Section

Under the "ExternalIdentityClaimSection" section you'll see the following values.
These values are used for SAML SSO. If you are not using SSO, keep these values as blank
Key
Value
ExternalIdentityClaim > FirstName > ExternalClaimName
ExternalIdentityClaim > LastName > ExternalClaimName
ExternalIdentityClaim > Email > ExternalClaimName
ExternalIdentityClaim -> MemberOf -> ExternalClaimName

5. Update the Cinchy appsettings.json

  1. 1.
    Open the C:\Cinchy\appsettings.json file.
  2. 2.
    There is a "serilog" property that allows you to configure where it logs to. In the below code, update the following:
    1. 1.
      "Name" must be set to "File" so it writes to a physical file on the disk.
    2. 2.
      Set "path" to the file path to where you want it to log
Note that you can also update the Serilog property in the Cinchy SSO appsettings.json
For more about customizing Serilog, visit the documentation here.
1
"Serilog": {
2
"MinimumLevel": {
3
"Default": "Debug",
4
"Override": {
5
"Microsoft": "Warning",
6
"System.Net": "Warning"
7
}
8
},
9
"WriteTo": [
10
{
11
"Name": "File",
12
"Args": {
13
"path": "C:\\CinchyLogs\\Cinchy\\log.json",
14
"formatter": "Serilog.Formatting.Compact.CompactJsonFormatter, Serilog.Formatting.Compact"
15
}
16
}
17
]
18
}
Copied!
3. Under the <connectionStrings> section you'll see
1
<add name="SqlServer" connectionString="" />
Copied!
4. Replace this with the same connection string value you set in step 4.2.

6. Create the IIS Applications

  1. 1.
    Open an administrator instance of PowerShell
  2. 2.
    Execute the below commands to create the IIS applications and enable anonymous authentication. (This is required in order to allow authentication to be handled by the application)
1
New-WebApplication -Name Cinchy -Site 'Default Web Site' -PhysicalPath C:\Cinchy -ApplicationPool CinchyWeb
2
New-WebApplication -Name CinchySSO -Site 'Default Web Site' -PhysicalPath C:\CinchySSO -ApplicationPool CinchySSO
3
Set-WebConfigurationProperty -Filter "/system.webServer/security/authentication/anonymousAuthentication" -Name Enabled -Value True -PSPath IIS:\ -Location "Default Web Site"
Copied!
To enable HTTPS, the server certificate must be loaded and the standard IIS configuration completed at the Web Site level to add the binding.

7. Test the Application

  1. 1.
    Access the <base url>/Cinchy (e.g. http://app.cinchy.co/Cinchy) through Google Chrome.
  2. 2.
    Once the login screen appears, enter the credentials:
    1. 1.
      The default username is admin and the password is cinchy.
    2. 2.
      You will be prompted to change your password the first time you log in.
To avoid users from having to access the application at a url that contains /Cinchy, you can use a downloadable IIS extension called URL Rewrite to remap requests hitting the <base url> to <base url>/Cinchy. The extension is available here.

8. Next Steps

Navigate to the following sub-pages to deploy the following bundled v5 components: