0

On application start I am checking app versions from the assembly against a value stored in the web.config. If the versions differ, I want to trigger the default installer.

So I need to get an Action route. But this doesn't seem possible to do as the HttpContext is null? I have an Action called "Install" in my "HomeController"

Any ideas how I can get a RedirectToAction or similar to work from the Application_Start ?

YodasMyDad
  • 9,248
  • 24
  • 76
  • 121

1 Answers1

0

You wont have access to Request in application start, as per IIS blog.

Ramifications of this have been discussed on SO before

Global ASAX - get the server name

Request is not available in this context

For you case, could you not call the installation code directly from global without having to go to the action?

Community
  • 1
  • 1
dove
  • 20,469
  • 14
  • 82
  • 108