Setting up IIS with TCAdmin
Prerequisites
Make sure you are running a supported Windows Server environment and have already downloaded and installed TCAdmin 2 before starting this guide.
If you are using IIS with TCAdmin, do not configure your monitor ports as 80 or 443. Instead, use the default ports 8880 and 8881.
When the monitor starts, it reconfigures the ports using the HTTP listener. If ports 80 or 443 are assigned to the monitor, this can cause conflicts with IIS, resulting in service disruptions or unexpected behavior.
To avoid issues, ensure that your monitor ports are correctly set to 8880 and 8881 in the TCAdmin configuration.
Before setting up IIS with TCAdmin, ensure that:
- You are running a Windows Server environment.
- You have downloaded and installed TCAdmin 2.
Step 1: Install IIS with ASP.NET 4.0/4.5 Support
- Open Server Manager and select Add Roles and Features.
- Select Web Server (IIS) under Server Roles.
- Under Application Development, ensure the following features are enabled:
- ASP.NET 4.x
- .NET Extensibility 4.x
- Complete the installation process.
Step 2: Set up SQLite Database (Skip if using MySQL)
If you are using an SQLite database, ensure you copy sqlite3.dll
to the correct location (C:\Windows\System32
).
If you're using SQLite for TCAdmin:
- Copy the
sqlite3.dll
file fromTCAdmin2\Monitor\sqlite3.dll
toC:\Windows\System32
.
Step 3: Configure IIS for TCAdmin
1. Add User to IIS Group
- Add the
TCAWeb
user to theIIS_IUSRS
group. This ensures proper permissions for web access.
2. Create a Website in IIS Manager
- Open IIS Manager.
- Right-click Sites > Add Website:
- Set Physical Path to
C:\Program Files\TCAdmin2\ControlPanel.MVC
. - Set Application Pool to
.NET v4.5
.
- Set Physical Path to
- Right-click on the newly created website and select Add Application:
- Name the application Aspx (case-sensitive).
- Set Physical Path to
C:\Program Files\TCAdmin2\ControlPanel
. - Use the same .NET v4.5 application pool.
3. Configure Website Settings
- In IIS Manager, select the website, click Basic Settings, and click Connect As.
- Enter the credentials for the Windows user running the TCAdmin website.
- Ensure this user has full permissions on the following folders:
ControlPanel
ControlPanel.MVC
Cache
Temp
Logs
Database
- Read permissions for
Monitor\Shared
4. Configure Aspx
Application
Ensure the Aspx application uses the same user as the main website (from step 3).
5. Let's Encrypt (Optional)
Using Let's Encrypt for SSL certificates is recommended if you don’t already have a custom SSL certificate.
If using Let's Encrypt, bind the website to a specific IP and hostname to prevent TCAdmin from changing the certificate.
6. Set Folder Permissions
Ensure that you assign the correct permissions to IIS APPPOOL\.NET v4.5
. Missing or incorrect permissions can cause issues with the TCAdmin control panel.
-
Grant full control to
IIS APPPOOL\.NET v4.5
on the following directories:C:\Program Files\TCAdmin2\Cache
C:\Program Files\TCAdmin2\Temp
C:\Program Files\TCAdmin2\Logs\Web
C:\Program Files\TCAdmin2\ControlPanel
C:\Program Files\TCAdmin2\ControlPanel.MVC
C:\Program Files\TCAdmin2\Database
-
Under "Connect as...", enter the user and password of the Windows user that runs your website.
If using TCAWeb, start the monitor in console mode and execute tcaweb-pass
to obtain the password or attach TCAdmin2\Monitor\TCAWeb.config
to a support ticket for assistance.
tcaweb-pass
- Configure the Aspx application to run with the same user as the main website.
Step 4: Database Configuration
Disabling the built-in TCAdmin web server is permanent unless you run the re-enable command provided.
-
To disable the built-in TCAdmin web server, run the following SQL command:
DELETE FROM tc_server_enabled_components
WHERE module_id = '07405876-e8c2-4b24-a774-4ef57f596384'
AND component_id = 2
AND server_id = 1;If you ever wish to enable the built in web server again you can run the following SQL command:
INSERT INTO tc_server_enabled_components
(module_id, component_id, server_id)
VALUES ('07405876-e8c2-4b24-a774-4ef57f596384', 2, 1);
Step 5: Disable Output Caching
- In IIS Manager, select your website.
- Double-click Output Caching.
- Under Actions, click Edit Feature Settings.
- Uncheck both Enable Cache and Enable kernel cache.
- Click OK.
Step 6: Configure IIS for Multiple Worker Processes
Running multiple worker processes improves performance for high-traffic websites but requires proper session state configuration.
-
Follow the instructions in Step 4 to disable the built-in web server.
-
Start the ASP.NET State Service and set it to Automatic:
- Go to Start > Administrative Tools > Services.
- Right click on ASP.net state service > properties > Recovery
- First failure:
Restart
- Second failure:
Restart
- Subsequent failures:
Restart
- First failure:
-
Edit the following web.config files:
- TCAdmin2\ControlPanel\Web.config
- TCAdmin2\ControlPanel.MVC\Web.config
3.1. Replace the session state configuration:
<sessionState timeout="30" />
With:
<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false" timeout="30" />
Step 7: SSL Certificate Installation
Option 1: Install Let's Encrypt SSL (Recommended)
For automatic SSL management, Let's Encrypt is the recommended option. Certify The Web provides a simple interface to manage certificates.
-
Download Certify The Web: Download it from Certify The Web.
-
Install and Configure:
- Follow the on-screen instructions for installation.
- For detailed documentation, visit Certify The Web Documentation.
Option 2: Use a Custom SSL Certificate
Ensure that the SSL certificate is correctly installed in Windows following the linked guide, as an incorrectly configured certificate can cause connection issues.
-
Install your custom SSL certificate following this guide.
-
Open the TCAdmin 2 Configuration Utility and navigate to IP and Port Settings.
-
Select your custom SSL certificate from the list and apply the changes.
It’s a good idea to back up your configuration and website settings before making any major changes to the IIS or TCAdmin setup.
Adjust URLs, file paths, and commands based on your specific setup and configuration. For additional support, consult the official TCAdmin or IIS documentation.