Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Global.asax
- void FormsAuthentication_OnAuthenticate(object sender, FormsAuthenticationEventArgs e) {
- // check for postback somehow
- if (Request.Url == "MyPage.aspx" && Request.Form["MySuperSecret"] == "123") {
- e.User = new GenericPrincipal(new GenericIdentity(), new string[] { });
- }
- }
- ( HttpContext.Request.UserHostAddress )
Add Comment
Please, Sign In to add comment