How to specify security access for assembly running in ASP.NET

Discussion in 'ASP .Net' started by Shimon Sim, Mar 1, 2006.

  1. Shimon Sim

    Shimon Sim Guest

    How to specify security access for assembly running in ASP.NET?

    FxCop requests it always and I always ignore it. I am thinking that this is
    good thing to know how to do.

    I usually need the same rights that asp.net process has. The dll needs to
    write some files under directory - usually but some times not.

    Thank

    Shimon
     
    Shimon Sim, Mar 1, 2006
    #1
    1. Advertising

  2. Hi Shimon,

    Welcome to the MSDN newsgroup.

    As for the security access setting for .net assembly in ASP.NET web
    application, it is divided into two parts:

    1. By default, the .NET Code Access security (CAS) setting for ASP.NET
    application is at "Full" trust level, so there is not limit for .net
    security restriction on the managed code executing in ASP.NET applcation.
    What we need to take care of is the raw windows OS level security. This
    concern with the ASP.NET's process identity (or the impersonated account)
    with those protected resource our ASP.NET application will access(such as
    eventlog, registry, filesystem....).

    2. Also, we can apply .net's code access security setting (policy) for the
    code, assembly in our ASP.NET web application. This security is configured
    and checked within the .net managed runtime, independent of the operating
    system's security. Here are some msdn reference on applying .net CAS to
    ASP.NET web application:

    #Chapter 9 ┬ĘC Using Code Access Security with ASP.NET
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/ht
    ml/THCMCh09.asp

    #How To: Use Code Access Security in ASP.NET 2.0
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html
    /paght000017.asp

    Hope this helps.

    Regards,

    Steven Cheng
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
     
    Steven Cheng[MSFT], Mar 2, 2006
    #2
    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. SA
    Replies:
    0
    Views:
    482
  2. Gerrit Hulleman

    Specify security access in JNLP

    Gerrit Hulleman, Jul 21, 2004, in forum: Java
    Replies:
    0
    Views:
    403
    Gerrit Hulleman
    Jul 21, 2004
  3. Lucky
    Replies:
    1
    Views:
    9,149
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    May 19, 2006
  4. Replies:
    5
    Views:
    629
    Vitaly
    Jan 28, 2007
  5. Chris Herring
    Replies:
    0
    Views:
    198
    Chris Herring
    May 4, 2005
Loading...

Share This Page