Security and Audit functionality

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Re: Security and Audit functionality

    Raymond,

    The only problem i see with this is that it means you have to have one page
    per system feature. For example. Say I wished to have one page that
    handled viewing certain data but that would also be used for editing that
    same data. Given this solution the call would return the same class name if
    you were editing or viewing the data, I need that distinction but without
    having a page for viewing a page for editing, etc.

    MattC


    "Raymond Lewallen" <Raymond.CTR.Lewallen@nospam.faa.gov> wrote in message
    news:OMEFqxnQEHA.3532@TK2MSFTNGP12.phx.gbl...
    > Problem I ran into originally. It will return the class name of the ascx.
    > I have an SecurityControl.ascx file, but pass the calling class name as a
    > parameter into the SecurityControl function that does the validating.
    >
    > "MattC" <m@m.com> wrote in message
    > news:%23aTzthlQEHA.3524@TK2MSFTNGP09.phx.gbl...
    > > Raymond,
    > > Cool solution. Here's a question.
    > >
    > > If the call to
    > > 'System.Reflection.MethodBase.GetCurrentMethod().D eclaringType.Name' is
    > made
    > > within an ascx file which is a header that i place on every page. Will
    > > .Name return the class name of the control or thepage that contains it?
    > >
    > > Thanks
    > >
    > > Matt
    > >
    > >
    > > "Raymond Lewallen" <Raymond.CTR.Lewallen@nospam.faa.gov> wrote in
    message
    > > news:uUwfcPlQEHA.1644@TK2MSFTNGP09.phx.gbl...
    > > > > Although this would work, it does require that each page knows ahead
    > of
    > > > time
    > > > > what its SystemTask name is.
    > > >
    > > > I do something very similar. Each user logs into the application
    under
    > a
    > > > particular roleId. For the SystemTask name, I use the class name of
    the
    > > > code behind page. These SystemTasks and roleIds are cross-referenced
    in
    > a
    > > > table that I perform a lookup against. If a record is found, they can
    > see
    > > > the page and I record the audit data, otherwise if no record, no can
    see
    > > > page.
    > > >
    > > > To get the name of the class you are currently working in, use:
    > > >
    > > > System.Reflection.MethodBase.GetCurrentMethod().De claringType.Name
    > > >
    > > > This is how I solve knowing what the SystemTask is ahead of time, as
    > each
    > > > aspx page is a task in our system.
    > > >
    > > > HTH,
    > > >
    > > > Raymond Lewallen
    > > >
    > > >
    > >
    > >
    >
    >

    MattC Guest

  2. Similar Questions and Discussions

    1. utility to audit sharing and security permissions
      Hi, I'm wondering if there is an utility out there somewhere that could audit my windows 2000 server shared folders and their security...
    2. Pls tell me the exact difference between "Audit Account Logon Events" and "Audit Logon Events"
      Gurus, Regarding auditing of domain logins by my network users, I am unclear of the advantages of auditing for "Audit Account Logon Events"...
    3. Security Audit Failure
      Ooopps, maybe you should respond by e-mail only, thank you...Jerry
    4. Baseline Security Audit Clobbered STored Profiles
      I made the mistake of downloading and running the new release of the Microsoft Baseline Security audit. Since running this tool, I have not been...
    5. security audit in events viewer
      It means that somebody on the domain set security policy on your machine. Nothing to worry about. Eric -- Eric Fitzgerald Program Manager,...
  3. #2

    Default Re: Security and Audit functionality

    Matt,

    Yes, in your scenario, I do see your problem. You may get stuck with static
    task names hard coded into the class depending on the current function the
    user is performing, of which the code for both tasks are contained.

    Sorry I don't have any further input at the moment, if I come up with
    something else, I'll post back.

    Raymond Lewallen

    "MattC" <m@m.com> wrote in message
    news:uZFpIXwQEHA.3732@TK2MSFTNGP10.phx.gbl...
    > Raymond,
    >
    > The only problem i see with this is that it means you have to have one
    page
    > per system feature. For example. Say I wished to have one page that
    > handled viewing certain data but that would also be used for editing that
    > same data. Given this solution the call would return the same class name
    if
    > you were editing or viewing the data, I need that distinction but without
    > having a page for viewing a page for editing, etc.
    >
    > MattC
    >
    >
    > "Raymond Lewallen" <Raymond.CTR.Lewallen@nospam.faa.gov> wrote in message
    > news:OMEFqxnQEHA.3532@TK2MSFTNGP12.phx.gbl...
    > > Problem I ran into originally. It will return the class name of the
    ascx.
    > > I have an SecurityControl.ascx file, but pass the calling class name as
    a
    > > parameter into the SecurityControl function that does the validating.
    > >
    > > "MattC" <m@m.com> wrote in message
    > > news:%23aTzthlQEHA.3524@TK2MSFTNGP09.phx.gbl...
    > > > Raymond,
    > > > Cool solution. Here's a question.
    > > >
    > > > If the call to
    > > > 'System.Reflection.MethodBase.GetCurrentMethod().D eclaringType.Name'
    is
    > > made
    > > > within an ascx file which is a header that i place on every page.
    Will
    > > > .Name return the class name of the control or thepage that contains
    it?
    > > >
    > > > Thanks
    > > >
    > > > Matt
    > > >
    > > >
    > > > "Raymond Lewallen" <Raymond.CTR.Lewallen@nospam.faa.gov> wrote in
    > message
    > > > news:uUwfcPlQEHA.1644@TK2MSFTNGP09.phx.gbl...
    > > > > > Although this would work, it does require that each page knows
    ahead
    > > of
    > > > > time
    > > > > > what its SystemTask name is.
    > > > >
    > > > > I do something very similar. Each user logs into the application
    > under
    > > a
    > > > > particular roleId. For the SystemTask name, I use the class name of
    > the
    > > > > code behind page. These SystemTasks and roleIds are
    cross-referenced
    > in
    > > a
    > > > > table that I perform a lookup against. If a record is found, they
    can
    > > see
    > > > > the page and I record the audit data, otherwise if no record, no can
    > see
    > > > > page.
    > > > >
    > > > > To get the name of the class you are currently working in, use:
    > > > >
    > > > > System.Reflection.MethodBase.GetCurrentMethod().De claringType.Name
    > > > >
    > > > > This is how I solve knowing what the SystemTask is ahead of time, as
    > > each
    > > > > aspx page is a task in our system.
    > > > >
    > > > > HTH,
    > > > >
    > > > > Raymond Lewallen
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Raymond Lewallen Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139