Here's my scenario:
- Using SQL Server sessions (due to web farm)
- customErrors is On using redirect
- There is a membership provider that uses sessions to store user information
- In web.config, there are
<location>
sections that<allow users="*">
. This is used for static content (e.g. images)
Whenever I try to access the error page or even static content, the session tries to start up (probably due to membership provider). If the SQL Server is down, that throws an exception.
Is there any way to prevent the membership provider and/or sessions from trying to initialize when I'm accessing certain folders (i.e. static content)?