Previous Next

Thread: An item with the same key has already been added.

Last post 06-20-2008 3:02 AM by ksingla. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 06-17-2008, 3:56 PM

    An item with the same key has already been added.

     I am trying to sync a single web app between two different servers using the following command.

    msdeploy.exe -verb:sync -source:metakey=/lm/W3SVC/1/ROOT/dotnet/WebApp,username=u,password=pw,computername=v2  -dest:metakey=/lm/W3SVC/1/ROOT/dotnet/WebApp,username=u,password=pw,computername=d2 -whatif -verbose > msdeploy.log

     When I run it, I get the error "Fatal: An item with the same key has already been added. "

     Shouldn't it be writing over this key since it is syncing?
     

  • 06-17-2008, 4:19 PM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 561

    Re: An item with the same key has already been added.

    Hi Jacobladams.

    Can you pls run the command with -debug switch and send us the exception stack trace information?

    msdeploy -verb:sync -source:metakey=/lm/w3svc/1/root/dotnet/webapp,username=u,password=pw,computername=v2 -dest:metakey=/lm/w3svc/1/root/dotnet/webapp,username=u,password=pw,computername=d2 -whatif -verbose -debug

    -Kanwal

  • 06-17-2008, 4:59 PM In reply to

    Re: An item with the same key has already been added.

     Informational: Pre-authenticating to remote agent URL 'http://d2/MSDEPLOYAGENTSERVICE' as 'u'.
    Informational: Attempting to sync without payload (optimistic sync).  Waiting for response...
    Informational: Received response from agent (HTTP status 'OK')
    Informational: Processing any events fired during remote agent operation
    Informational: The dependency check 'IisVersion' found no issues
    Informational: The dependency check 'Iis5IsolationMode' found no issues
    Informational: The dependency check 'IIS7SourceUsingMetabase' found no issues
    Informational: The dependency check 'ConfigRedirection' found no issues
    Informational: The dependency check 'InUseDependency' found no issues
    Informational: The dependency check 'InstalledComponent' found no issues
    Fatal: An item with the same key has already been added.  
    Debug: System.ArgumentException: An item with the same key has already been added.
       at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Microsoft.Web.Deployment.ParseSystemInfo.ParseWebRestrictionList()
       at Microsoft.Web.Deployment.GetDependenciesMethod.Invoke(DeploymentObject targetObject, Object[] parameters)
       at Microsoft.Web.Deployment.DeploymentObject.Invoke(String methodName, Object[] parameters)
       at Microsoft.Web.Deployment.DependencyRuleHandler.DependencyRuleData.get_SourceDependencyInfo()
       at Microsoft.Web.Deployment.DefaultDependencyRuleHandler.DriveSpaceCheck.PerformCheck(DependencyRuleData ruleData)
       at Microsoft.Web.Deployment.DependencyRuleHandler.PreSync(DeploymentSyncContext syncContext, DeploymentObject destObject, DeploymentObject sourceObject, Boolean& proceed)
       at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
       at Microsoft.Web.Deployment.DeploymentObject.Sync(DeploymentObject sourceObject, DeploymentSyncConfig syncConfig)
    Change count: 0
    Fatal count: 1

  • 06-17-2008, 7:42 PM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 561

    Re: An item with the same key has already been added.

    This is the same error as was reported in other forum post. Can you pls see if you have a duplicate isapi/cgi in websvc restriction list and if you do, is it possible for you to remote duplicate entries?

    -Kanwal-

  • 06-18-2008, 12:08 PM In reply to

    Re: An item with the same key has already been added.

    We removed the duplicate entries and msdeploy ran without errors.  Thank you very much for the help.

     However, we seem to be having another issue.  Correct me if I am wrong, but shouldn't the command listed in the first post do a complete copy of the that web application, including files, .NET version, secuirty, app pool, etc?  Running this command doesn't appear to do anything.  Running it along with a dirpath sync seems to copy the files, but the .net version and AppPool remain unchanged. Is something misoperating or is there something else I can do to sync this data.

     
    Thanks,

    Jake
     

  • 06-18-2008, 12:16 PM In reply to

    Re: An item with the same key has already been added.

     If needed, here is the verbose debug log:

     Informational: Pre-authenticating to remote agent URL 'http://d2/MSDEPLOYAGENTSERVICE' as 'u'.
    Informational: Attempting to sync without payload (optimistic sync).  Waiting for response...
    Informational: Received response from agent (HTTP status 'OK')
    Informational: Processing any events fired during remote agent operation
    Informational: The dependency check 'IisVersion' found no issues
    Informational: The dependency check 'Iis5IsolationMode' found no issues
    Informational: The dependency check 'IIS7SourceUsingMetabase' found no issues
    Informational: The dependency check 'ConfigRedirection' found no issues
    Informational: The dependency check 'InUseDependency' found no issues
    Informational: The dependency check 'InstalledComponent' found no issues
    Informational: The dependency check 'DriveSpace' found no issues
    Informational: The dependency check 'IsapiCgiExistence' found no issues
    Informational: The dependency check 'UsingW3SVCMimemap' found no issues
    Informational: The dependency check 'AppPoolNotFound' found no issues
    Informational: The dependency check 'DisabledDependency' found no issues
    Informational: The dependency check 'NativeModuleExistence' found no issues
    Informational: The dependency check 'ProviderPathLevelMismatch' found no issues
    Informational: Attribute value equality changed to True when comparing metaProperty (/lm/W3SVC/1/ROOT/dotnet/birthdaylist/AppRoot) to /lm/W3SVC/1/ROOT/dotnet/birthdaylist/AppRoot due to rule AppRootNormalize
    Change count: 0

  • 06-20-2008, 3:02 AM In reply to

    • ksingla
    • Top 10 Contributor
    • Joined on 06-13-2006, 11:02 PM
    • Redmond, WA
    • Posts 561

    Re: An item with the same key has already been added.

    Hi Jake,

    AppPool properties only move if you sync lm/w3svc/apppools metaKey. As you are trying to sync a vdir which doesn't include apppool properties, msdeploy is not syncing those. You can try a -verb:dump command to see what all is picked from the source machine to be synced to destination.

    Also, msdeploy is supposed to be used only for server or site level sync/migration and not for app/vdir. Using it to sync/migrate apps/vdirs is not a supported scenario in GL release. We are looking at supporting that in our next release.

    -Kanwal-

Page 1 of 1 (7 items)
Page view counter