If you need to check at Runtime if your User belongs to a Security group. Here's how to do it -
Assuming the IIS Application has Authentication set to "Windows Authentication". The Request object of HttpContext has the Logged in users Identity which contains Groups. Here is the code which validates if a user belongs to a particular Security group -
var
bool