« Previous Next »

Thread: trouble with skip and replace rule in msdeploy.exe.configsettings

Last post 07-06-2009 3:05 PM by cowen. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 07-06-2009, 11:53 AM

    • cowen
    • Not Ranked
    • Joined on 07-06-2009, 11:24 AM
    • Posts 9

    trouble with skip and replace rule in msdeploy.exe.configsettings

    article http://blogs.iis.net/msdeploy/archive/2008/05/23/how-to-write-skip-and-replace-rules-for-msdeploy.aspx "How to write skip and replace rules for MSDeploy" fits well what I am trying to do.

    The article provides a command line syntax, and then the rule syntax. The command line works for me, I am having trouble creating the rule. I have found in the link above and related links some variants on the rule syntax, but no success with any of them.

    I list below the error, the command line that works, the rule that I have created, and finally a brief description of what I am trying to do and topology. I am hoping I have a simple syntax problem.

    The error I get is:

    C:\Program Files\IIS\Microsoft Web Deploy>msdeploy.exe -verb:sync -source:metake
    y=lm/w3svc/976573149 -dest:metakey=lm/w3svc/976573149,computername=wwwd
    Error:  The type initializer for 'Microsoft.Web.Deployment.DeploymentManager' th
    rew an exception.
    Error:  An XML exception occurred.
    C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe.configsettings: (line 55,
     position 3)
    Error:  Rule 'www140' of type 'Microsoft.Web.Deployment.ReplaceRuleHandler' coul
    d not be loaded.
    Error:  The type 'Microsoft.Web.Deployment.ReplaceRuleHandler' could not be load
    ed. The configuration settings may not be valid.
    Error:  Could not load type 'Microsoft.Web.Deployment.ReplaceRuleHandler' from a
    ssembly 'Microsoft.Web.Deployment, Version=7.1.0.0, Culture=neutral, PublicKeyTo
    ken=31bf3856ad364e35'.
    Error count: 1

    The command line that works:

     C:\Program Files\IIS\Microsoft Web Deploy>msdeploy.exe -verb:sync -source:metake
    y=lm/w3svc/976573149 -dest:metakey=lm/w3svc/976573149,computername=wwwd -replace
    :objectName=metaProperty,scopeAttributeName=name,scopeAttributeValue="ServerBind
    ings",match=172\.23\.22\.131,replace=172.23.22.141
    Action: Updating metaProperty (/lm/w3svc/976573149/ServerBindings)
    Change count: 1

    The rule that I have created (taken from the <rules> section of msdeploy.exe.configsettings:

     <rules>
     <rule name="UrlScanSkipIncompat" enabled="true" />
     <rule name="www140" type="Microsoft.Web.Deployment.ReplaceRuleHandler"
           isDefault="true" objectName="metaProperty" scopeAttributeName="name"
           scopeAttributeValue="ServerBindings"
           match="172\.23\.22\.131" replace="172.23.22.141" />
    </rules>

    What I am doing:

    I have two IIS6 servers. One, source (wwws), has some 12 application pools and about 3,000 web sites, each appPool bound to a separate IP address. I wish to replicate the entire server to a second (wwwd), forming a web farm. I have installed the msdeploy agent on wwwd, am running msdeploy.exe on wwws, have taken care that the msdeploy.exe.configsettings file is identical on the two servers. I think msdeploy is using .net 3.0, and have installed the .net 3.5 sp1 package, which installs 2.0/SP2, 3.0/SP2 and 3.5/SP1.

    My intention is to create 12 rules, one for each of the 12 IP addresses bound to wwws and the translation for wwwd.

    Thank you, cowen


     

     

  • 07-06-2009, 2:24 PM In reply to

    • yaminij
    • Top 50 Contributor
    • Joined on 09-25-2007, 12:41 AM
    • Posts 185

    Re: trouble with skip and replace rule in msdeploy.exe.configsettings

    Skip-Replace rules have changed for RC. Please check the blog post here for more information. In your scenario you should be using type="Microsoft.Web.Deployment.DeploymentReplaceRuleHandler" inside msdeploy.exe.configsettings

    Thanks
    Yamini Jagadeesan, SDET, Microsoft IIS Team
  • 07-06-2009, 3:05 PM In reply to

    • cowen
    • Not Ranked
    • Joined on 07-06-2009, 11:24 AM
    • Posts 9

    Re: trouble with skip and replace rule in msdeploy.exe.configsettings

    Thank you for your prompt reply!

     cowen

     

Page 1 of 1 (3 items)
Microsoft Communities