Exception raised by GetProfile(ConfigFile) when called from Application_Start (IIS 7.5)

Issue #5 resolved
obviex repo owner created an issue

When trying to retrieve the current application profile for a configuration file from the web application's Application_Start event handler in IIS 7.5+ under integrated mode, the following exception gets raised: "Request is not available in this context".

Comments (3)

  1. obviex reporter

    This happens only on IIS 7.5 or later for applications running in integrated mode.

    Workaround 1: Change IIS application pool mode from Integrated to Classic (NOT RECOMMENDED).

    Workaround 2: Move code to an event handler or method that has access to the current HttpContext's Request object.

  2. Log in to comment