ASP.NET settings in Plesk

Sites built on classic ASP.NET (.NET Framework, Web Forms, MVC 5) are configured in two places: ASP.NET is turned on in the hosting settings, and application parameters are set on the ASP.NET Settings page. For ASP.NET Core and modern .NET, see the separate article.

Enabling ASP.NET

  1. Open the domain card, the Hosting & DNS tab, and click Hosting Settings.
  2. In the Web scripting section, check Microsoft ASP.NET.
  3. In Microsoft ASP.NET version, choose 4.8.0.
  4. Click Save.
Hosting Settings, Web scripting: Microsoft ASP.NET and version
Hosting Settings, Web scripting: Microsoft ASP.NET and version

The ASP.NET Settings page

Open the Dashboard tab, the Dev Tools group, ASP.NET Settings. The panel writes these parameters to the site's web.config file.

ASP.NET Settings: Framework version, connection strings, errors
ASP.NET Settings: Framework version, connection strings, errors
  • Framework version — the current version (4.8.0); the Change Version link changes it.
  • Connection strings — the name and parameters of a database connection; Add one more adds another string.
  • Custom error mode — how errors are shown: RemoteOnly shows details only on the server itself, visitors see a generic page. In Custom errors you can map an error code to your own page URL.
  • Compilation and debugging — the default page language and the Switch on debugging checkbox.
  • Globalization settings — request, response and file encodings, Culture and UI Culture.

Save with Save or Apply. Restore Default Configuration resets the values to defaults.

Do not leave Switch on debugging on for a production site: debugging slows the application and can expose code details to visitors.

Connecting to MS SQL

In the connection string, specify the instance where the database was created, for example Server=localhost\MSSQLSERVER2022. Details are in MS SQL in Plesk.

Questions and answers
The panel writes its parameters to web.config. Before making changes, save a copy of the file in File Manager and compare after saving.
Temporarily set Custom error mode to Off, read the error, then set it back to RemoteOnly. Also check the logs.