The enableSsl attribute is only supported starting from .NET Framework 4.0. If your site is running on an older version like .NET 2.0 or 3.5, IIS doesn't recognize that attribute and will throw this error when reading web.config.
To quick fix this, you just need to make sure your site is using the right version of .NET.
Open IIS Manager.
Go to Application Pools.
Find the app pool your site is using.
On the right-hand side, check the .NET CLR Version.
If it says v2.0, you'll need to switch it to v4.0: