Difference between revisions of "MVC Templates"

Line 1: Line 1:
 
'''<span style="color:red">Currently MVC templates are only supported on Windows.</span>''' The MVC templates are currently in beta testing.
 
'''<span style="color:red">Currently MVC templates are only supported on Windows.</span>''' The MVC templates are currently in beta testing.
 +
== Features ==
 +
* The following features are configurable in the game settings:
 +
** Custom background images. Place the images in TCAdmin2\ControlPanel.MVC\Views\Default so they are used in all your custom themes.
 +
** Custom service home page template per game.
 +
** Custom status template per game.
 +
** Join URL
 +
* When creating a new theme in Settings > Themes you can set the theme type to MVC. A folder will also be created in TCAdmin2\ControlPanel.MVC\Views where you can place your custom .cshtml and images. Keep the same directory structure as the Default template.
 +
 
== Requirements ==
 
== Requirements ==
 
* .NET '''4.5''' must be installed on your server.
 
* .NET '''4.5''' must be installed on your server.

Revision as of 23:42, 13 March 2019

Currently MVC templates are only supported on Windows. The MVC templates are currently in beta testing.

Features

  • The following features are configurable in the game settings:
    • Custom background images. Place the images in TCAdmin2\ControlPanel.MVC\Views\Default so they are used in all your custom themes.
    • Custom service home page template per game.
    • Custom status template per game.
    • Join URL
  • When creating a new theme in Settings > Themes you can set the theme type to MVC. A folder will also be created in TCAdmin2\ControlPanel.MVC\Views where you can place your custom .cshtml and images. Keep the same directory structure as the Default template.

Requirements

  • .NET 4.5 must be installed on your server.
  • Install TCAdmin version 2.0.126.0 or greater.

Stop the monitor

  • Stop the monitor service.

Generate a machine key

TCAdmin starts 2 web applications. The classic ASP.NET web app and the MVC web app. Both need to have the same machine key.

  • Make a copy of TCAdmin2\ControlPanel\Windows.config and name it Windows.Custom.config.
  • Make a copy of TCAdmin2\ControlPanel.MVC\Windows.config and name it Windows.Custom.config.
  • Use this tool to generate an ASP.NET 2.0 Machine Key. http://www.developerfusion.com/tools/generatemachinekey/ Do this even if you already had a custom Machine Key. This will force the users to log out of their current session.
  • Edit the 2 Windows.Custom.config with notepad. Replace the following line with the value generated in the previous step. If you run IIS with the built in website disabled you must also update your Web.config because it won't get updated automatically.
<machineKey validation="AES" decryption="AES" decryptionKey="AutoGenerate" validationKey="AutoGenerate" />

IIS configuration (optional)

  • Configure the website in IIS with these instructions: Configure_the_TCAdmin_website_to_run_with_IIS The only difference is that your main website will point to TCAdmin2\ControlPanel.MVC. If you already have your website configured in IIS just change the website path to TCAdmin2\ControlPanel.MVC.
  • Right click on the control panel website and select add application. Set the alias to Aspx and point it to TCAdmin2\ControlPanel. Both must run with the classic .NET application pool.

Update the monitor configuration

  • Edit TCAdmin2\Monitor\TCAdminMonitor.exe.config. Add these lines under <appSettings> (update them if they already exist).
<add key="TCAdmin.Public.MVC" value="True" />
<add key="TCAdmin.Public.MVC.WebServicesPath" value="../ControlPanel.MVC" />

Start the monitor

  • Start the monitor service.

Going back to the classic ASP.NET themes

If you want to go back to the classic ASP.NET themes:

  • Stop the monitor.
  • Edit TCAdmin2\Monitor\TCAdminMonitor.exe.config and set the value of TCAdmin.Public.MVC to False
  • Generate a new MachineKey for your Windows.Custom.config so all users are forced to log out.
  • Start the monitor.

Features

  • The following features are configurable in the game settings:
    • Custom background images. Place the images in TCAdmin2\ControlPanel.MVC\Views\Default so they are used in all your custom themes.
    • Custom service home page template
    • Custom status template
    • Join URL
  • When creating a new theme in Settings > Themes you can set the theme type to MVC. A folder will also be created in TCAdmin2\ControlPanel.MVC\Views where you can place your custom .cshtml and images. Keep the same directory structure as the Default template.

Known Issues

  • Login from WHMCS is not implemented.
  • Captcha is not implemented.
  • Swipe right in mobile doesn't always work.
  • Reseller MVC templates are not implemented.
Retrieved from "https://help.tcadmin.com/index.php?title=MVC_Templates&oldid=1552"