0

I'm using Azure webjob to populate list of data , which I need to use in my MVC Web application.

But After executing azure webjob i'm not getting data inside mvc web application in that old object which I used in azure web job.

Is there any global variable concept here to persist data from web job execution to mvc app?

Neo
  • 15,491
  • 59
  • 215
  • 405

1 Answers1

1

Azure may run your WebJobs on all your instances (reference), so your WebJob should be stateless (which is a good practice) and should not rely on any global variables.

To persist data, depends on your data type, I usually use Azure Storage (Table, Queue) to store some simple data used by my WebJobs. Or if it is related to your database, connect directly to there (Auzre SQL, SQL Server or MySQL) and persist data there.

Community
  • 1
  • 1
Alex Lau
  • 1,687
  • 10
  • 17