Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%
- string strIP = Request.ServerVariables["REMOTE_ADDR"];
- if(strIP.Substring(0, 8) != "10.10.2.")
- {
- System.Security.Principal.WindowsIdentity oUser = Request.LogonUserIdentity;
- System.Security.Principal.WindowsPrincipal oPrincipal = new System.Security.Principal.WindowsPrincipal(oUser);
- if(!oPrincipal.IsInRole("RemoteEmailUsers"))
- {
- Response.Write("Sorry, you are not allowed to access OWA from this location: " + strIP);
- Response.End();
- }
- }
- %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement