msdeploy


MSDeploy connection string for both dbFullSql and web.config


I have a (for the time being) rather simple site manifest
<sitemanifest>
<IisApp path="c:\pathtosite" />
<dbFullSql path="Data Source=.\SQLEXPRESS;Initial Catalog=table;User Id=user;Password=pwd" includeIfNotExists="true" includeData="false" transacted="true" />
</sitemanifest>
The dbFullSql provider results in promting for a connection string when importing the site through IIS7.5. I'd love to reuse the information provided to update the web.config connection string but have no idea on how to achieve this
It sounds like you would like to use parameters to me... When you import a package in the IIS inetmgr UI default parameters are created for each of the providers, which is why you get that prompt for the connection string. However you can also add explicit parameters when you create the package. If you're doing this with the msdeploy.exe cmd line, you can put the parameters in a file and then add a -declareParamFile: to your package command to add them. The parameter for the database would probably be something like this - this says to use the provided connection string for both the dbFullSql provider path and replace whatever's in the connectionStrings section of web.config:
<parameter name="ConnectionString" description="Connection string for my database" defaultValue="Data Source=.\SQLExpress;Initial Catalog=table;User Id=user;Password=pwd" >
<parameterEntry type="ProviderPath" scope="dbfullsql" match="Data\ Source=" />
<parameterEntry type="XmlFile" scope="\\web.config$" match="//connectionStrings/add/#connectionString" />
</parameter>
More parameter examples/resources here:
http://learn.iis.net/page.aspx/722/reference-for-the-web-application-package/ AND
http://technet.microsoft.com/en-us/library/dd569084(v=WS.10).aspx
If you have other Web Deploy questions please try our forum on IIS.net (http://forums.iis.net/1144.aspx).

Related Links

Can I reference an MSDeploy parameter value in a manifest file?
Msdeploy 401 while trying to sync directories
Configuring MSDeploy 3.5 WS2008 R2
msdeploy and runCommand results in vague “Access is denied” error
WebDeploy - Not able to log on the user '.\WDeployConfigWriter'
MSDeploy: How to delete a single file on remote server
Remove Parameters from the generated setParameters.xml
Web Deploy parameterization of an XML config file where settings are embedded in CDATA elements
MsDeploy 3.5 automatic backup creates zip files lacking the Contents directory
msdeploy how to grant read/write permission for IIS_IUSRS to c:\windows\temp folder
MSDeploy skip root web.config
How can I skip deleting a folder but still sync the folder contents for an Web Deploy (msdeploy) sync?
How do I target an already existing application pool with webdeploy?
msdeploy and AppPool running under domain user
WebDeploy from TeamBuild fails with http 504
Webdeploy skip rule includes .css files as well as .cs

Categories

HOME
rust
openshift
ionic2
entity-framework
artificial-intelligence
paypal-ipn
activemq
google-webmaster-tools
repair
capistrano
tfs2010
port
azure-logic-apps
stack-overflow
nexus3
rangy
bundler
webstore
global-variables
uima
asciimath
pickle
amazon-mws
jest
hdl
opentext
annotation-processing
objectmapper
mapnik
appcode
shapeless
mongoengine
bootstrap-sass
variable-variables
xll
praat
export-to-pdf
newtons-method
icepdf
robust
asihttprequest
webalizer
android-5.0-lollipop
datediff
android-webservice
dynamics-crm-4
d3v4
gapi
metabase
tablespace
livecycle
nvda
carmen
system.net.mail
jenkins-workflow
gravatar
ui4j
android-mapview
openshift-cartridge
srv-record
kefir.js
physicsjs
tidyr
mutators
fiware-bosun
sunos
utf8-decode
image-rotation
berkeley-db-xml
back
loginview
network-printers
hyphen
application-server
disjoint-union
ax
mongo-jackson-mapper
reentrancy
proc-open
towers-of-hanoi
image-formats
word-frequency
acpi
datacontracts
uipasteboard
resharper-5.0
browser-based

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App