Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Those seem to be 2 unrelated/non-comparable things.</p> <p>According to this: <a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.principalpermissionattribute.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.security.permissions.principalpermissionattribute.aspx</a>, that attribute is used to limit which users can execute code.</p> <p>Element <code>authorization</code> in web.config is to limit which [browser] users can access URL's that the website serves content for.</p> <p>You wouldn't normally want that attribute in your asp.net app, anywhere, ever - if for anything else, then because your web app is executed by a single user account (app pool user), and unless you're impersonating some other users to access some resources, you'll never even have an opportunity to use that (even then). I see how that attribute might be useful in some desktop apps, maybe.</p> <p>EDIT: Small addition/correction/clarification: I guess if you use windows authentication, and <code>&lt;identity impersonate="true"/&gt;</code> in web.config as a way to execute code on behalf of <strong>windows</strong> user accounts, then that attribute can possibly be used to protect usage/invocation of certain classes/methods - but we normally/alternatively still use <code>authorization</code> in web.config to protect access to url's for certain user groups, and conditionals to enable/disable features for certain user groups. Even though I think I now understand the purpose of that attribute, I doubt I'd ever be tempted to use it [even] in this scenario (win-auth + impersonation). +1</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload