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?

2
  • 1
    This code in ASP.Net Core 2.0: Creating UrlHelper without request may allow you do do what you need to, but it is not ideal. Commented Dec 19, 2017 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 Commented Dec 19, 2017 at 15:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.