4

In an ASP.net 2 MVC app, I've implemented some background tasks via the IHostedServices interface, similar to the idea exposed here.

Now I need to generate Urls targeting internal routes and I'm struggling to access something like an ActionContext object or routing object having methods to do that.

Any idea?

guiohm
  • 101
  • 4
  • 1
    This code in [ASP.Net Core 2.0: Creating UrlHelper without request](https://stackoverflow.com/questions/46096068/asp-net-core-2-0-creating-urlhelper-without-request) may allow you do do what you need to, but it is not ideal. – SpruceMoose Dec 19 '17 at 14:48
  • Indeed... Way too complex. I think I'm heading towards generating those urls at a later point in the code flow. Thanks – guiohm Dec 19 '17 at 15:46

0 Answers0