Search code examples
asp.netoraclewebdeploy

Deploy ASP.NET Web Application using Oracle Data Access


I want to deploy my web app which using Oracle.ManagedDataAccess.Client as the provider. I usually using WebDeploy and transform the web.config using respective connection string for dev and production database. But when I using this method there is an error, stating that "Oracle.ManagedDataAccess.Client is not supported for incremental database publishing."

This is the connection string in web.config:

<connectionStrings>
    <add name="TestConnectionString" 
    connectionString="DevelopmentConnectionString"
    providerName="Oracle.ManagedDataAccess.Client" />
</connectionStrings>

This is the connection string in web.release.config:

<connectionStrings>
    <add name="TestConnectionString" 
    connectionString="ProductionConnectionString"
    providerName="Oracle.ManagedDataAccess.Client"
    xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
</connectionStrings>

WebDeploy Error

How is the best practice to deploy web app that using Oracle as the database? Do I have to change the provider, or using XSLT to transform, or any other way to do this? Please help.


Solution

  • Looks like WebDeploy is also trying to deploy the database. You can turn this off in the Project Settings under Package/Publish Web:

    enter image description here