To configure ASP.NET settings for a website, follow these steps. Note: This does not apply to Linux hosting plans with Plesk.
2. Click on Websites & Domains.
3. Locate your website’s domain name.
4. Click ASP.NET Settings. Note: If this button is missing, make sure that ASP.NET is switched on in Websites & Domains > Hosting Settings. If this doesn’t work, please contact support.
5. Set up the strings to determine the database connection for ASP.NET’s applications (that use databases). Note: This option is available for ASP.NET 2.0x only.
The first time you open the ASP.NET configuration screen for the first time, sample parameters with common constructions will be displayed. You can delete this to specify your strings:
- Click Add connection string and enter the required data into the Name and Connection Parameters input field to add a string.
- To remove a string, click Remove.
6. Set up custom error messages to be returned by ASP.NET applications in Custom Error Settings:
To set the custom error messages mode, select an option from the Custom error mode menu:
- On: custom error messages are enabled
- Off: custom error messages are displayed, and detailed errors are to be shown
- RemoteOnly: custom error messages are displayed only to remote clients, and ASP.NET errors are shown to local host users
To add a custom error message (applied unless the Off mode is selected), enter values in Status Code and Redirect URL fields, and click +. You cannot add a custom error message with an already existing error code, but you can redefine the URL for the existing code.
- Status Code: defines the HTTP status code, redirecting the error page
- Redirect URL: defines the web address of the error page, presenting information about the error to the client
To remove a custom error marriage, click Remove.
7. Configure compilation settings in the Compilation and Debugging field:
- Choose an entry from the Default web page language to determine the default programming language for dynamic compilation files.
- To enable compiling retail binaries, leave Switch on debugging empty.
- To enable compiling debug binaries, check Switch on debugging. The source code fragments containing errors will be shown in a diagnostic page message. Note: When running the application in debug mode, memory and performance overhead occurs. It’s recommended to use debugging when you’re testing an application and disable it when deploying the application into a production scenario.
8. Configure encoding settings for ASP.NET applications in the Globalization Settings section:
- To set an adopted encoding of all incoming requests, enter an encoding value into Response encoding.
- To set an encoding to be used by default for parsing of .aspx, .asmx, and .asax files, enter an encoding value into File encoding (Note: the default is Windows-1252).
- To set a culture to be used by default for processing incoming web requests, select an item from Culture.
- To set a culture that must be used by default when processing searches for a locale-dependent resource, select an item from UI Culture.
9. Set a code access security trust level for ASP.Net applications in Code Access Security. The CAS trust level is a security zone to which application execution is assigned, defining the server resources that the applications will have access to.
Note: When an assembly is assigned a trust level that’s too low, it doesn’t function correctly.
10. Enable the usage of additional scripts in Script Library Settings. Specifying the script library is necessary if validation web controls are used on your website. Note: This option is only available for ASP.NET 1.1.x.
- If you need additional scripts (for implementing objects to validate input data), provide the .NET framework script library settings. You can enter the path beginning with the domain root directory (preceded by the forward slash) into the Path to Microsoft script library. Alternatively, click the folder icon next to Path to Microsoft script library and browse to the required location.
- To initiate the auto-installation of files with scripts to the specified location, select Install. If the files already exist, they will be rewritten.
11. Set client session parameters in Session Settings:
- To set up the default authentication mode for applications, select an item from Authentication mode.
- To set up the time a session can remain idle, type the number of minutes into Session timeout.
12. Click OK to apply your changes.
If you need help with Plesk, please open a support ticket from your dashboard.