Setting up IIS with TCAdmin
Install IIS with Support for ASP.NET 4.0/4.5 Development
- Install IIS on your system with support for ASP.NET 4.0/4.5 development. ASP.NET development can be found in Server Roles -> Web Server (IIS) -> Application Development - > .NET Extensibility 4.x.
Set up SQLite Database
- Copy
TCAdmin2\Monitor\sqlite3.dll
toC:\Windows\System32
if you are using an SQLite database.
Configure IIS
-
Add the user
TCAWeb
to theIIS_IUSRS
group. -
Manually create a website in IIS Manager:
- Web root:
Program Files\TCAdmin2\ControlPanel.MVC
- Application pool:
.NET v4.5
- Web root:
-
In IIS Manager, right-click on the created website and select "Add Application":
- Name:
Aspx
(case-sensitive) - Web root:
Program Files\TCAdmin2\ControlPanel
- Application pool:
.NET v4.5
- Name:
-
Select the website in IIS Manager:
- Click on "Basic Settings"
- Under "Connect as...", enter the user and password of the Windows user that runs your website.
- Ensure this user has full permissions on the following folders:
- ControlPanel
- ControlPanel.MVC
- Cache
- Temp
- Logs
- Database
- Read permissions on Monitor\Shared
-
If using TCAWeb, start the monitor in console mode and execute
tcaweb-pass
to obtain the password or attachTCAdmin2\Monitor\TCAWeb.config
to a support ticket for assistance. -
Configure the
Aspx
application to run with the same user as the main website. -
If using Let's Encrypt, bind the website to a specific IP and hostname to prevent TCAdmin from changing the website's certificate.
-
Give full permissions to
IIS APPPOOL\.NET v4.5
on the following folders:- 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
Database Configuration
-
Execute the following command on your database to disable the built-in web server:
DELETE FROM tc_server_enabled_components WHERE module_id = '07405876-e8c2-4b24-a774-4ef57f596384' AND component_id = 2 AND server_id = 1;
-
If you need to enable the built-in web server again, use the following command:
INSERT INTO tc_server_enabled_components (module_id, component_id, server_id) values ('07405876-e8c2-4b24-a774-4ef57f596384', 2, 1);
Disable Output Caching
- Disable output caching to prevent issues with user sessions:
- Open IIS Manager
- Select your website
- Double click on "Output Caching"
- Under Actions on the right side, click on "Edit Feature Settings"
- Uncheck "Enable Cache" and "Enable kernel cache"
- Click OK
Configure IIS with Multiple Worker Processes
-
Follow the instructions above to disable the built-in web server.
-
Start the ASP.NET state service and set the startup to Automatic:
- Go to Start > Administrative Tools > Services
-
Edit
TCAdmin2\ControlPanel\Web.config
andTCAdmin2\ControlPanel.MVC\Web.config
:- Replace
<sessionState timeout="30"/>
with<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false" timeout="30" />
- Replace
-
Open IIS Manager and select the advanced properties of the .NET Application pool. Increase the number of worker processes as needed.
Lets Encrpyt Install (recommended)
Installation
-
Download Certify The Web: Visit the official website of Certify The Web at https://certifytheweb.com/ and download the appropriate version for your operating system (Windows).
-
Install Certify The Web: Run the installer and follow the on-screen instructions to install Certify The Web on your system.
Here is the full documentation to Certify The Web https://docs.certifytheweb.com/
Use Custom SSL Certificate (Windows) (optional)
-
Install the SSL certificate in Windows. Follow the instructions at Trustico.
-
Launch the TCAdmin 2 Configuration Utility:
- Go to Start > Programs > TCAdmin 2 > Configuration Utility
-
Navigate through the utility until you reach the IP and port settings.
-
Check the option to use a custom certificate and select it from the list.
-
Continue through the utility until the monitor is restarted.
The actual URLs, paths, and commands may need adjustments based on your specific setup and requirements.