1

If i have an azure function with an httptrigger is there a way to get the ActionContext? There is the IActionContextAccessor interface i can register as a singleton...but nothing in the azure function runtime seems to actually set it for each request so it's seems unable to achieve what i'm after.

i'm making the assumption there is an underlying actioncontext to be got in the case of an HttpTrigger function..that may be a bad assumption.

Chris DaMour
  • 3,650
  • 28
  • 37
  • What data are you wanting your function to be able to access? – John H Sep 28 '20 at 22:46
  • i'm building up a ViewContext to pass to razor and part of that is an actioncontext, i was wondering if there was one already present i can use instead of building my own off of the HttpContext – Chris DaMour Sep 28 '20 at 23:24
  • Have you come across [this](https://github.com/Azure/Azure-Functions/issues/1539) yet? – John H Sep 28 '20 at 23:37
  • 1
    yeah, the sample repo at the end i've contributed to actually, but i'm a few generations beyond it now trying to connect az functions routing to razor...that stuff was all just about using razor all as a template – Chris DaMour Sep 29 '20 at 00:02

0 Answers0