izikandrw
izikandrw

Reputation: 1873

Web.config isn't correct when deploying to Azure

Summary

I am trying to deploy a simple website to Azure. Summed up: How do I get the Web.config to have the information from Web.Release.config when I deploy?

More information

I am using Web.config transforms for my Release configuration.

Locally, when I right click on the Release web.config transform and select preview it shows that the local connection string is being replaced with the connection string from Web.Release.config. You can see in the screenshot below that the attribute MultipleActiveResultSets is being added to the connection string.

enter image description here

Than I deploy to my azure website by right clicking on the web solution and select 'Publish'. Everything deploys fine. Here is a screenshot of the publish wizard, as you can see, the 'Release' configuration is selected:

enter image description here

But then if I ftp into azure where my files deployed to and inspect the Web.config, the connection string does not have the MultipleActiveResultsSets attribute.

Here is a screenshot of my configuration manager enter image description here

Upvotes: 2

Views: 330

Answers (1)

spender
spender

Reputation: 120450

The checkbox:

Use this connection string at runtime (update destination web.config)

appears to be checked. This will overwrite the connection string that gets substituted by your web.release.config with the value in the textbox.

Upvotes: 2

Related Questions