none
Web.Config transform question. Connection Strings RRS feed

  • Question

  • Say I have this in Dev
    <connectionStrings>
       <add name="MyConnection" connectionString="yadayada" provider="blahblah"
    </connectionStrings>

    Upon Deployment to QA I need to transform that into below, how do I do that? I tried to xdt:Transform="Replace" but that wraps <connectionStrings xdt:Transform="Replace" around what I want to be the new connectionString element.

    Thanks, John

    <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
        <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
          <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
          <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
            <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
              <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
              <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
                <KeyName>Rsa Key</KeyName>
              </KeyInfo>
              <CipherData>
                <CipherValue></CipherValue>
              </CipherData>
            </EncryptedKey>
          </KeyInfo>
          <CipherData>
            <CipherValue></CipherValue>
          </CipherData>
        </EncryptedData>
      </connectionStrings>


    JC

    Monday, January 6, 2020 8:58 PM

All replies

  • Hi MrRocketMonkey,

    Welcome to MSDN forum.

    According to your description, this forum is discussing about usage of msbuild tool and msbuild project. Since your thread is more related to Asp.net, we recommend you could redirect to https://forums.asp.net/, then you could get dedicated support there.

    Thank you for understanding.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, January 7, 2020 5:58 AM