milosz
milosz

Reputation: 855

EntityFramework db context picks us wrong connection string in Azure WebJob

I have a DbContext class in a shared DAL layer which is used both by a WebSite and its associated WebJob. I want both the WebSite and the WebJob to use some shared connection string. For the WebSite, I use publish profiles and Web.config transformations. However, it doesn't seem to be picked up by the WebJob.

What is the best solution to solve this?

Upvotes: 0

Views: 648

Answers (1)

Amit Apple
Amit Apple

Reputation: 9182

Configure the connection strings you are using in the management portal for the website. These connection strings will be available for both your website and your WebJobs.

Upvotes: 1

Related Questions