Symptoms
-
The following error message is shown when:
-
opening ASP.NET settings in Plesk at Domains > example.com > ASP.NET Settings.
-
changing password of the main FTP user at Domains > example.com > FTP Access.
-
issuing a Let's Encrypt certificate for a domain.
aspnetcfg failed: Can't detect .NET version. Possible site does not use ASP.NET (Error code 1)
-
-
The website may also load with the error message:
The page cannot be displayed because an external server error has occurred.
Cause
Misconfiguration in IIS:
- .NET CLR version is set to No Managed Code in application pool settings of the website in IIS Manager > HOSTNAME > Application Pools > example.com.
- Microsoft ASP.NET support is enabled in Plesk at Domains > example.com > Hosting & DNS > Hosting Settings.
Resolution
-
Go to Domains > example.com > Hosting & DNS > Hosting Settings.
-
Disable the option Microsoft ASP.NET support and click Apply.
-
Enable the option Microsoft ASP.NET support back and click Apply.