Is there an easy way to share connection string between website and WebJob on Azure? The only way I found already is to read web.config from console application, but it doesn't look good for me.
The Azure website and WebJob are sharing the application settings/connection strings set on the Azure portal.
So assuming you're using a .NET console application as a WebJob, just use ConfigurationManager
to get your connection string (to help test it, just have your app.config have the same connection string key).
If you're not using .NET console application, the connection strings are in the environment so you can just query for them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With