I need to set up a bunch of paths and URLs when my app starts, ie in global.asax
. Using UrlHelper.Content()
is the easiest way to do that, but it is not available for use.
So how can I get an instance of it inside global.asax
? I tried creating one, but of course RequestContext
doesn't exist.
The answer most linked-to is here but that throws exceptions for me. I am using the latest MVC3.