Works when running from VS but not on IIS

I have an simple asp.net core 1.0 and both Hangfire and it’s dashboard works fine when running it locally from Visual Studio, but when I deploy to Azure it only shows an 500 - page. I turned on failed request tracking, and there is a lot of HANDLER_PRECONDITION_NOT_MATCH in the log. The first failing event is after URL_CACHE_ACCESS_END and looks partly like this:

<EventData>
  <Data Name="ContextId">{00000000-0000-0000-6607-0080000000F7}</Data>
  <Data Name="Name">svc-ISAPI-2.0-64</Data>
  <Data Name="Precondition">classicMode,runtimeVersionv2.0,bitness64</Data>
 </EventData>
 <RenderingInfo Culture="en-US">
  <Opcode>HANDLER_PRECONDITION_NOT_MATCH</Opcode>
 </RenderingInfo>

Any help would be appreciated!

EDIT: I now also tried to deploy it locally on IIS (Windows 10) and the same error occurs.

Fixed it. When I started to test it locally on my IIS, the feedback loop got quicker and thru trial and error I found out that I used an old syntax (from RC1) to retrieve the connection string as a parameter to the UseSqlServerStorage.