Code Access Security


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Code Access Security

  1. #1
    awhaley Guest

    Code Access Security


    In my work environment, I often work off a network drive.

    Whenever I open a project on the mapped drive, .Net tells me that
    the code is not fully trusted because it is located on a network drive.
    This causes a security exception whenever I execute code that involves
    ADO.Net components.

    Does anyone know how to tell .Net to trust a specified network drive?
    I have looked at some of the code access admin tool information. Most of
    it looks like it is for granting permission to a particular piece of code
    -
    not to a drive.

    thanks



  2. #2
    Ian Lowe Guest

    Re: Code Access Security

    Hi,

    > Does anyone know how to tell .Net to trust a specified network drive?
    > I have looked at some of the code access admin tool information. Most of
    > it looks like it is for granting permission to a particular piece of code


    You are running afoul of Code Access Security which .NET uses to determine
    the security privileges that a particular piece of code is granted. If you
    check on the Microsoft .NET Framework Configuration tool from your
    Administrative tools, you'll be able to adjust the security permissions.

    One option for intranet scenarios is to sign your code with a strong name
    key and then give that key elevated permissions. For info, see (beware of
    line wrap)
    http://msdn.microsoft.com/library/?u...html/cpconassi
    gningassemblystrongname.asp?frame=true

    You can use the sn.exe tool to generate a .snk key file.

    Hope this helps,

    Ian.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center