Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Authorization of request

Reply
Thread Tools

Authorization of request

 
 
Gawel
Guest
Posts: n/a
 
      09-22-2004
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
 
Reply With Quote
 
 
 
 
GrantMagic
Guest
Posts: n/a
 
      09-22-2004
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:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Manohar Kamath [MVP]
Guest
Posts: n/a
 
      09-22-2004
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:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Gawel
Guest
Posts: n/a
 
      09-22-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Authorization does not override File Authorization? SeanRW ASP .Net Security 1 05-25-2006 06:18 AM
HTTP GET request with basic authorization? Christopher J. Bottaro Python 1 01-04-2005 02:44 PM
Re: HTTP GET request with basic authorization? John J. Lee Python 1 01-04-2005 12:30 AM
Re: HTTP GET request with basic authorization? Jonas Galvez Python 0 01-02-2005 11:12 PM
Re: Accessing Request.InputStream / Request.BinaryRead *as the request is occuring*: How??? Brian Birtle ASP .Net 2 10-16-2003 02:11 PM



Advertisments