I want to restrict all access to my Orchard site(hosted through Azure) except for traffic from a particular ip address.
Originally, I made a regular Page through the Dashboard titled "Access Denied" which explained to the user why they couldn't get to the content. Then I put this code into the Application_BeginRequest() in the Global.asax.cs file to redirect outside
if (HttpContext.Current.Request.UserHostAddress != "00.000.0.00")
It worked fine up until I changed the site url to our custom domain. Now I get the "too many redirects" error, instead of the page.
Is there a Server.Tranfer type method that would work in place of Response.Redirect() that would take me directly to that page's url?
Should I be going about this a different way?
Restricting access still works, but my goal is simply to have something friendlier than the average browser's error page show up.