? ASP.NET Configuration

Setting .NET Framework Version

  1. Go to Websites & Domains
  2. Click on ASP.NET Settings
  3. Select .NET Framework version (2.0, 4.0, 4.5, 4.8)
  4. Choose .NET Framework mode (Integrated or Classic)
  5. Configure additional settings as needed
  6. Click OK to apply changes

Common ASP.NET Settings

Setting Description Recommended Value
Pipeline Mode IIS processing mode Integrated
Enable Parent Paths Allow parent path references False (security)
Session Timeout Session duration in minutes 20 minutes
Maximum Request Size Max upload size 4096 KB
Execution Timeout Script execution time limit 90 seconds

Web.config Essential Settings

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.web>
    <compilation debug="false" targetFramework="4.8" />
    <httpRuntime targetFramework="4.8" maxRequestLength="51200" />
    <customErrors mode="RemoteOnly" defaultRedirect="error.html" />
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login" timeout="2880" />
    </authentication>
  </system.web>
  
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <defaultDocument>
      <files>
        <clear />
        <add value="Default.aspx" />
        <add value="index.html" />
      </files>
    </defaultDocument>
  </system.webServer>
</configuration>

Application Pool Settings

  • Managed Pipeline Mode: Integrated (recommended) or Classic
  • .NET CLR Version: v4.0.30319 for .NET 4.x applications
  • Enable 32-bit Applications: Set to True if using 32-bit components
  • Identity: ApplicationPoolIdentity (default and secure)

Deploying ASP.NET Application

  1. Build your application in Release mode
  2. Upload all files to httpdocs folder via FTP
  3. Ensure bin folder contains all required DLLs
  4. Set appropriate .NET Framework version in Plesk
  5. Configure connection strings in web.config
  6. Test application functionality

Common ASP.NET Issues and Solutions

  • 500 Internal Server Error: Check web.config syntax and .NET version
  • Could not load file or assembly: Ensure all DLLs are in bin folder
  • Access denied errors: Check folder permissions for IIS_IUSRS
  • Session state errors: Configure session state in web.config
War diese Antwort hilfreich? 0 Benutzer fanden dies hilfreich (0 Stimmen)