ASP.NET Authorization

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

  1. #1

    Default ASP.NET Authorization

    I'd like to use role in Forms authentication and I found the following words
    from .net SDK about ASP.NET Authorization.
    " Identifies a targeted role for this element. The associated IPrincipal
    object for the request determines the role membership. You can attach
    arbitrary IPrincipal objects to the context for a given request and they can
    determine role membership in whatever way you like."

    And I have the following codes:
    Dim ui As New System.Security.Principal.GenericIdentity("popman" )
    Dim roles() As String = {"admin"}
    Dim urole As New System.Security.Principal.GenericPrincipal(ui,
    roles)

    My questions is
    1. what is "the context for a given request" ?
    2. where is "the context for a given request" ?
    3. How to attach urole to the context?

    Thanks.:-)


    Thanks.


    popman Guest

  2. Similar Questions and Discussions

    1. Role authorization
      I use custom authentication and I set the identity with following line FormsAuthentication.SetAuthCookie(username.Text, False) How do I set the...
    2. URL Authorization
      Hi All, I am trying to write several applications, for external users. They will use forms authentication to login. My question concerns url...
    3. authorization for sub directory
      Hi All, Could anybody advise me for the following.. I want to restrict access to a subdirectory in an web application which has "integrated...
    4. [PHP] SMTP - Authorization?
      Hey all! glad to bea here! got alot to learn! k, basically i am sending out a mailing list to customers, - using a PHP script, however the...
    5. Don't have Administrative authorization
      Problem resolved. Just as I thought...IT. With some off-sight assistance I''ve been able to resolve the issue. Thanks, Jan :)
  3. #2

    Default RE: ASP.NET Authorization

    Check out this MSDN Article. It is exactly what you are looking for

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT04.as[/url]

    -Eric
    Eric Marvets Guest

  4. #3

    Default Re: ASP.NET Authorization

    Thank you.It 's exactly what I want.

    -Neo

    "Eric Marvets" <anonymous@discussions.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ
    :F8EACCA5-F077-43C1-B180-B05055F254CA@microsoft.com...
    > Check out this MSDN Article. It is exactly what you are looking for.
    >
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT04.asp[/url]
    >
    > -Eric


    popman 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