Applicable to:
- Plesk for Windows
Symptoms
Changing the handler (ASP status, PHP version, etc.) in the domain settings Home > Domains > example.com fails with the following error message:
PLESK_ERROR: Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ASPClassic'
or
Unable to access IIS settings for domain in Home > Domains > example.com. It's getting failed with the error message below:
PLESK_ERROR: Internal error: Filename: \\?\C:\Windows\system32\inetsrv\config\applicationHost.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)\Parallels\Plesk\admin\bin64\websrvmng.exe" --get-mime-types "--vhost-name=example.com" "--vdir-name=/"(vconsoleapp::run line 117)
Error code 1)
or
CONFIG_TEXT: Error Code 0x800700b7
Config Error Cannot add duplicate collection entry of type
Cause
IIS detects a duplicate entry for the same setting at a higher level in the configuration. Check the following Microsoft TechNet article for additional details
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):
C:\> %plesk_dir%\bin\repair.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.com\httpdocs
folder and remove duplicate entry of the directive from the error message.
If the issue still persist, review IIS configuration file %windir%\system32\inetsrv\config\applicationHost.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
:C:\> %windir%\system32\inetsrv\appcmd.exe add backup "My Backup Name"
-
Open the file
%windir%\system32\inetsrv\config\applicationHost.config
in a text editor and find the section containing the website configuration:CONFIG_TEXT: <location path="example.com">
-
Under this section, find
<handlers>
and remove the string starting with the collection entry name shown in the error ( ASPClassic ):CONFIG_TEXT: <add name="ASPClassic" path="*.asp" verb="GET,HEAD,POST,TRACE" modules="IsapiModule" scriptProcessor="C:\Windows\System32\inetsrv\asp.dll" resourceType="Either" />
-
Save the changes made in the
%windir%\system32\inetsrv\config\applicationHost.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.
Comments
0 comments
Please sign in to leave a comment.