asp.net - Automatic edit a config file with password after deployment from github to azure -


i have asp.net web application on azure, continous integration github. works good, , have managed move of passwords , connectionstrings off source , application settings. there 1 file cannot manage solve how provide connectionstring without having in source. file filesystemproviders.config looks like:

 <provider alias="media" type="our.umbraco.filesystemproviders.azure.azureblobfilesystem, our.umbraco.filesystemproviders.azure">    <parameters>      <add key="connectionstring" value="**secret1**"/> 

is there anyway make script running after each deployment replaces **secret1** connectionstring automatically? or other way around?

i found solution this, posting in case wondering same. kudu service has post deployment action hooks. after creating new directory in "d:\home\site\deployments\tools\" named "postdeploymentactions", put 2 files directory, , script copies connectionstrings right place.

  1. copyfiles.bat

    copy d:\home\site\deployments\tools\postdeploymentactions\hiddenfilesystemproviders.config d:\home\site\wwwroot\config\filesystemproviders.config 
  2. hiddenfilesystemproviders.config config file private connectionstring.

the scripts runs after each deployment github azure.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -