I have made a HttpModule that redirects a user based on values entered in a list on the site. When a user accesses the site and I check for values in the list, it returns empty. When i access the site with the system account, I get the contents of the list just fine.
I tried the following, but the list is still empty:
SPList redirects;
SPSecurity.RunWithElevatedPrivileges(
() => redirects = web.Lists["Redirect"]);
How can I access the list in a way that returns all content, regardless of the permissions of the current user?