Need to detect user IP Address, but calling Request.UserHostAddress from razor/cshtml returns nothing

Topics: Customizing Orchard, Troubleshooting
Aug 31, 2016 at 8:27 AM
Forgive me, i'm very new to Orchard.

I have a need to detect if a user is coming from a certain subnet. In order to do that, I had hoped I could call ____@Request.UserHostAddress__ from the layout.cshtml on my custom theme, but it appears that amidst the processing pipeline that information is inaccessible. (returns nothing).

Is there a better way I can do this?

thank you very much in advance - I appreciate any help you all can give me.