Symptoms
-
Changing the handler (ASP status, PHP version, etc.) in the domain settings Home > Domains > example.com fails with the following error message:
Error: Cannot add duplicate collection entry of type ‘add’ with unique key attribute ‘name’ set to ‘ASPClassic’
-
Unable to access IIS settings for domain in Home > Domains > example.com.:
external error: Filename: ?C:Windowssystem32inetsrvconfigapplicationHost.config
Line number: 182673 Error: Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.woff’
In module Exception type:System.Runtime.InteropServices.COMException at Microsoft.Web.Administration.Interop.AppHostWritableAdminManager.GetAdminSection(String bstrSectionName, String bstrSectionPath) at
…
at execute “C:Program Files (x86)ParallelsPleskadminbin64websrvmng.exe” –get-mime-types “–vhost-name=example.com” “–vdir-name=/”(vconsoleapp::run line 117)
Error code 1)
Error Code 0x800700b7
Config Error Cannot add duplicate collection entry of type -
example.com fails to be open with:
500 external server error
-
IIS > Sites > example.com > ISAPI Filters fails with:
Cannot add duplicate collection entry of type ‘filter’ with unique key attribute ‘name’ set to ‘ISAPI_Rewrite_32’
Cause
IIS detects a duplicate entry for the same setting at a higher level in the configuration.
Resolution
-
Log in to the server via RDP
-
Open IIS Manager and remove the domain IIS > Sites > example.com
Note: It will delete only IIS configuration of the website and left web content intact
-
Re-create website configuration in IIS by runnig the following command in Command Prompt (cmd.exe):
%plesk_dir%binrepair.exe –reconfigure-web-site -web-site-name example.com
If the steps above do not help, check domain’s web.config file in %plesk_vhosts%example.comhttpdocs
folder and remove duplicate entry of the directive from the error message.
If the issue still persists
Review IIS configuration file %windir%system32inetsrvconfigapplicationHost.config
and remove duplicate directives from the error for the domain as below:
-
Back up the current IIS configuration using the following command in
cmd.exe
:%windir%system32inetsrvappcmd.exe add backup “My Backup Name”
-
Open the file
%windir%system32inetsrvconfigapplicationHost.config
in a text editor and find the section containing the website configuration:<location path=”example.com”>
-
Under this section, find
<handlers>
and remove the string starting with the collection entry name shown in the error:<add name=”ASPClassic” path=”*.asp” verb=”GET,HEAD,POST,TRACE” modules=”IsapiModule” scriptProcessor=”C:WindowsSystem32inetsrvasp.dll” resourceType=”Either” />
-
Save the changes made in the
%windir%system32inetsrvconfigapplicationHost.config
file and try to perform the failed action again.Note: If the error occurs again with another attribute ‘name’ , delete it from the
<handlers>
section using the steps described above.