Quartz.Net, A first chance exception of type 'System.NullReferenceException' occurred in Unity.Mvc3.dll When using Unity for DI

StackOverflow https://stackoverflow.com/questions/19824238

Question

Im using Im using Quartz.Net in a MVC application.

I have gotten it to work with triggering an easy jobb (just print some text to output window), but when trying to do more complex work like maintenance work for the database im getting an error and the maintenance work rolles back.

When using the class that implements the job for maintenance separately, that is outside of Quartz.net it works fine, but when using Quartz im getting following error:

"A first chance exception of type 'System.NullReferenceException' occurred in Unity.Mvc3.dll"

Any ideas?

When I said it worked separately I was using Execute with no parameter from a Controller action.

Was it helpful?

Solution

This answer might help you.

It's a simple implementation using MVC4 and Unity. At the bottom of the answer you will find a sample project.

Hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top