Autorization in ASP.NET

  • Thread starter Thread starter Leszek
  • Start date Start date
L

Leszek

Hello!
Can someone tell me how asp is authorizing (whitch account, when etc... ?
(the moment when IIS is running page).
I looked for a lot of pages, but i'm trying to find something that is really
clear...

I need to know to option (where i must set it etc.)
1) Anonymous account
2) Integrated Windows Authentication

Thanks for help.
 
Hi Leszek,

If you want to use Windows authentication, you can set it in Web.config:
<authentication mode="Windows" />

However, if you allow anonymous access, you can't get login user info. Only
when you deny anonymous access:

<authorization>
<deny users="?" /> <!-- Deny anonymous users -->
<allow users="*" /> <!-- Allow all other users -->
</authorization>

You can get login user info by
User.Identity.Name

HTH

Elton Wang
(e-mail address removed)
 
Thank you very much!!


U¿ytkownik "Elton W said:
Hi Leszek,

If you want to use Windows authentication, you can set it in Web.config:
<authentication mode="Windows" />

However, if you allow anonymous access, you can't get login user info.
Only
when you deny anonymous access:

<authorization>
<deny users="?" /> <!-- Deny anonymous users -->
<allow users="*" /> <!-- Allow all other users -->
</authorization>

You can get login user info by
User.Identity.Name

HTH

Elton Wang
(e-mail address removed)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top