Previous page | Next page | Locate page |

## Configuring ASP.NET

ASP.NET is a flexible set of tools and web development technologies that allows you to employ a number of applications based on ASP.NET framework. Plesk supports both 1.1.x and 2.0.x versions of the .NET framework and allows configuring most of its settings. Most ASP.NET configuration settings that commonly need to be customized in order for ASP.NET applications to function in a desirable way can be edited through Plesk.

To configure the server-wide ASP.NET settings:

1. Go to Server > ASP.NET. The settings for ASP.NET 1.1.x and ASP.NET 2.0.x are located under the corresponding tabs.
2. Set up the strings that determine database connection data for ASP.NET applications which use databases. This option is available only for ASP.NET 2.0.x.

   When you open the ASP.NET configuration page for the first time, sample connection parameters with common constructions are displayed. You can then delete them and specify your own strings.

   - To add a string, enter the required data into the Name and Connection Parameters input fields and click next to them.
   - To remove a string, click next to it.
3. Set up custom error messages that will be returned by ASP.NET applications in the Custom Error Settings field:
   - To set the custom error messages mode, select an appropriate option from the Custom error mode menu:
     - On - custom error messages are enabled.
     - Off - custom error messages are disabled and detailed errors are to be shown.
     - RemoteOnly - custom error messages are displayed only to remote clients, and ASP.NET errors are shown to the local host.
   - To add a new custom error message (which will be applied unless the Off mode was selected), enter the values in the Status Code and Redirect URL fields, and click .
     - Status Code defines the HTTP status code resulting in redirection to the error page.
     - Redirect URL defines the web address of the error page presenting information about the error to the client.

     Due to possible conflicts, you cannot add a new custom error message with an error code that already exists, but you can redefine the URL for the existing code.

   - To remove a custom error message from the list, click next to it.
4. Configure compilation settings in the Compilation and Debugging field:
   - To determine the programming language to be used as default in dynamic compilation files, choose an entry from Page default language list.
   - To enable compiling retail binaries, leave the Enable debugging checkbox empty.
   - To enable compiling debug binaries, select the Enable debugging checkbox. In this case, the source code fragments containing error will be shown in a diagnostic page message.

     Note. When running applications in debug mode, a memory and/or performance overhead occurs. It is recommended to use debugging when testing an application and to disable it before deploying the application into production scenario.

5. 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 the Request encoding field (default is utf-8).
   - To set an adopted encoding of all responses, enter an encoding value into the Response encoding field (default is utf-8).
   - To set an encoding which must be used by default for parsing of `.aspx`, `.asmx`, and `.asax` files, enter an encoding value into the File encoding field (default is Windows-1252).
   - To set a culture which must be used by default for processing incoming web requests, select an appropriate item from the Culture list.
   - To set a culture which must be used by default when processing searches for a locale-dependent resource, select an appropriate item from the UI Culture list.
6. Set a code access security trust level for ASP.NET applications in the Code Access Security field.

   CAS trust level is a security zone to which applications execution is assigned, defining what server resources the applications will have access to.

   Important. When an assembly is assigned a trust level that is too low, it does not function correctly. For more information on the permissions levels see http://msdn.microsoft.com/library/en-us/dnnetsec/html/THCMCh09.asp?frame=true#c09618429_010.

7. Set client session parameters in the Session Settings field:
   - To set up the default authentication mode for applications, select an appropriate item from the Authentication mode list. Windows authentication mode should be selected if any form of IIS authentication is used.
   - To set up time that a session can idle before it is abandoned, enter appropriate number minutes into the Session timeout field.
8. Ñlick OK to apply all changes.

Note: Plesk supports separate configurations for different versions of the .NET framework (1.1.x and 2.0.x).