Authorization of request

Discussion in 'ASP .Net' started by Gawel, Sep 22, 2004.

  1. Gawel

    Gawel Guest

    hajo,

    Is there any possiblity to get roles that user can have
    in order to access one concrete page? I need to
    get this info in run-time.


    tahnks in advence

    gawel
     
    Gawel, Sep 22, 2004
    #1
    1. Advertising

  2. Gawel

    GrantMagic Guest

    Yes, when the user signs on, you can create a cookie/session with a value
    stipulating that user has acces to that page,
    then in that page, you can request to see if that cookie/session exists.

    Using forms authentication, you can allow certain user access to certain
    pages.

    Or you can hard code a password onto the page and every time it is accessed,
    it will request this password



    "Gawel" <gawelek@SPAM_NO_NON_NOgazeta.pl> wrote in message
    news:...
    > hajo,
    >
    > Is there any possiblity to get roles that user can have
    > in order to access one concrete page? I need to
    > get this info in run-time.
    >
    >
    > tahnks in advence
    >
    > gawel
     
    GrantMagic, Sep 22, 2004
    #2
    1. Advertising

  3. You can use the IsInRole() method of the User object to check if the user
    belongs to a certain Windows group:

    If User.IsInRole("Administrators") Then
    ... let the user do something here
    End If

    The following article can also help:

    http://support.microsoft.com/default.aspx?kbid=306590

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    "Gawel" <gawelek@SPAM_NO_NON_NOgazeta.pl> wrote in message
    news:...
    > hajo,
    >
    > Is there any possiblity to get roles that user can have
    > in order to access one concrete page? I need to
    > get this info in run-time.
    >
    >
    > tahnks in advence
    >
    > gawel
     
    Manohar Kamath [MVP], Sep 22, 2004
    #3
  4. Gawel

    Gawel Guest

    Gawel wrote:

    > hajo,
    >
    > Is there any possiblity to get roles that user can have
    > in order to access one concrete page? I need to
    > get this info in run-time.


    Sorry, I was not prcise enough.
    I have a page name, e.g mypage.aspx
    and I need to get in run-time what
    roles user needs to have in order to access this
    page.

    gawel
     
    Gawel, Sep 23, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    2,052
    John Saunders
    Oct 16, 2003
  2. Christopher J. Bottaro

    HTTP GET request with basic authorization?

    Christopher J. Bottaro, Jan 2, 2005, in forum: Python
    Replies:
    1
    Views:
    571
    Fuzzyman
    Jan 4, 2005
  3. Jonas Galvez
    Replies:
    0
    Views:
    587
    Jonas Galvez
    Jan 2, 2005
  4. John J. Lee
    Replies:
    1
    Views:
    873
    John Reese
    Jan 4, 2005
  5. SeanRW
    Replies:
    1
    Views:
    367
    Dominick Baier [DevelopMentor]
    May 25, 2006
Loading...

Share This Page