Exception raised by GetProfile(ConfigFile) when called from Application_Start (IIS 7.5)
Issue #5
resolved
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)
-
reporter -
reporter This problem will be fixed in version 1.6.1.
-
reporter - changed status to resolved
Fixed in version 1.6.1.
- Log in to comment
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.