Setting Connectionstring in web.config via parameters.xml

dirkvanbergen's Avatar

dirkvanbergen

06 Mar, 2019 01:21 PM

Hello,

Please help :)

I've seen the other questions on this forum:
- https://help.appveyor.com/discussions/problems/6925-web-deploy-parametrization-issues
- https://help.appveyor.com/discussions/problems/4324-webdeploy-parametersxml-replace-not-working

But somehow the web.config in my deployment location is not getting changed. I've named the environment variable in AppVeyor "SmashingModel-Web.config Connection String". The name of the connectionstring is "SmashingModel", and in the parameters.xml it's named "SmashingModel-Web.config Connection String" as well.

I'm using the build option "Package for XCopy deployment", and using FTP deployment option with the Application setting set to the application name.

My repo is here: https://github.com/dirkvanbergen/smashing72

What am I missing? I've run out of things to change...

Thanks.

Dirk

  1. Support Staff 1 Posted by Ilya Finkelshte... on 06 Mar, 2019 08:28 PM

    Ilya Finkelshteyn's Avatar

    Hi Dirk,

    Parametrization is a feature of Web Deploy and works only with Web Deploy (not XCopy) packages and Web Deploy (not FTP) deployment.

    If you have to use XCopy packages and FTP, you may try to update web.config as XML document with PowerShell script at some stage before build (for example before_build script). I found a relevant example for you.

    Please let us know if this helps.

    Ilya.

  2. 2 Posted by dirkvanbergen on 08 Mar, 2019 08:46 AM

    dirkvanbergen's Avatar

    Will try

    Update:
    It works! Thanks for the tip!

  3. Support Staff 3 Posted by Ilya Finkelshte... on 08 Mar, 2019 06:00 PM

    Ilya Finkelshteyn's Avatar

    Good, thanks for the update :)

  4. Ilya Finkelshteyn closed this discussion on 08 Mar, 2019 06:00 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

26 Mar, 2019 06:34 AM
26 Mar, 2019 06:27 AM
25 Mar, 2019 09:12 PM
25 Mar, 2019 06:34 PM
25 Mar, 2019 06:20 AM

 

24 Mar, 2019 06:52 PM
24 Mar, 2019 05:26 PM
24 Mar, 2019 03:07 AM
22 Mar, 2019 02:20 PM
22 Mar, 2019 11:00 AM
22 Mar, 2019 02:51 AM