Article ID: 9362, created on Nov 25, 2010, last review on May 11, 2014

  • Applies to:
  • Operations Automation

Symptoms


POA cannot create IIS website for a customer, the provisioning task 'Create virtual web server' fails with the error message "Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'X-App-Hosting'" like in the example below:
Task ID 7924033  
Queue name      domain_service185640     
Task name       Create virtual web server 23693 (domain_id=3, hd_id=132358) on host 'winweb1.hosting.local' (host_id=1699).  
Task description        Create virtual web server 23693 (domain_id=3, hd_id=132358) on host 'winweb1.hosting.local' (host_id=1699).  
Queue status    Failed   
Start not earlier than  Sep-24-2010 14:05        
Method name     taskCreateWebSite on OBJREF:iis:0:getDomainService:185640        
Last execution output   Exception during execution of MPF request: 'Cannot create a file when that file already exists. [<response><errorContext description="Filename:
Error: Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'X-App-Hosting'" code="0x800700b7" executeSeqNo="100"><errorSource namespace="IIS7Provider" procedure="AddHTTPResponseHeaders"/></errorContext></response>]'.

 

Cause


Website was partially created in IIS (during previous task execution attempt), custom HTTP header 'X-App-Hosting' was added to it and POA cannot add this header anew.
 

Resolution


Remove the existing custom HTTP header for website in IIS to solve the problem.

1. Find ID of website in task properties, in this case it is 23693

2. Log into IIS server

3. Get list of custom HTTP headers for website in IIS:
cd C:\inetpub\AdminScripts
C:\inetpub\AdminScripts>cscript adsutil.vbs get w3svc/23693/root/HttpCustomHeaders
HttpCustomHeaders               : (LIST)  (2 Items)
  "X-Powered-By: ASP.NET"
  "X-App-Hosting: pool=classic"

4. We see that HTTP headers 'X-Powered-By' and 'X-App-Hosting' exist for website #23963. Remove them (since it is brand new website we can remove them, POA will create them):
C:\inetpub\AdminScripts>cscript adsutil.vbs set  w3svc/23693/root/HttpCustomHeaders ""
HttpCustomHeaders               : (LIST) ""

5. Check if headers were removed:
C:\inetpub\AdminScripts>cscript adsutil.vbs get w3svc/23693/root/HttpCustomHeaders
HttpCustomHeaders               : (LIST)  (0 Items)

6. Resubmit failed task in POA.
 

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF