global.asax

来自「微软的.NET论坛的源代码(COOL!!!)」· ASAX 代码 · 共 23 行

ASAX
23
字号
<%@ Import Namespace="AspNetForums" %>

<script language="C#" runat="server">

    //*********************************************************************
    //
    // Application_AuthenticateRequest Event
    //
    // If the client is authenticated with the application, then determine
    // which security roles he/she belongs to and replace the "User" intrinsic
    // with a custom IPrincipal security object that permits "User.IsInRole"
    // role checks within the application
    //
    // Roles are cached in the browser in an in-memory encrypted cookie.  If the
    // cookie doesn't exist yet for this session, create it.
    //
    //*********************************************************************
    void Application_AuthenticateRequest(Object sender, EventArgs e) {
      UserRoles forumRoles = new UserRoles();
      forumRoles.GetUserRoles();
    }

</script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?