Reputation: 9679
I've got an Azure web app, with a web job that uses the same database context, so by convention they pick up the same connection string name. They currently get the connection string from the web app application settings, to avoid having passwords stored in the config file.
I'm trying to improve security by setting up separate database users for the web app and web job, which need different levels of access, but given that they share the same context, I'm not sure how to get them to pick up different connection strings from the Azure application settings.
What's the best way to do this? The only option I can see is specifying the connection string every time the context is instantiated, but this seems like a bit of a pain.
Upvotes: 1
Views: 386
Reputation: 43203
I don't think there is a great solution to this. Possible workarounds:
Upvotes: 4