Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 30th, 2004, 09:57 AM
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default reflection code access security?

Does anyone have any information on reflection and code-access-security? I am assuming code-access-security based on the results I am seeing. I am searching a directory for assemblies that contain custom attributes. If I first run my search on the directory where my search app is running from, I find all the custom attributes, and can then find them in other directories as well. If I search another directory first, then I will find none on any search, even in the project directory.

When I say "not found" here is some more detail:
The Custom attributes are attached to a class in the assembly. I am able to reflect down to the class type in the assembly, and [type].getcustomattributes(false) does return the attributes. However, I cannot cast them as MyAttribute objects, and access their properties. If I print out the attribute.gettype.tostring I get "MyAttributes.MyAttribute". So, the attribute is there, I can access it, but I cannot treat it as an instance of MyAttribute or compare it to one. This does not happen when I run the search on the project directory first.

Is there some code-access-security issue that I need to take into consideration here?

Any info or help on this is greatly appreciated.
Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Code Access Security & Role Based Security robzyc C# 6 April 11th, 2008 02:31 AM
Access Security mateenmohd Access 2 November 10th, 2007 07:14 AM
Code Access Security problem balesh ASP.NET 1.0 and 1.1 Professional 0 June 8th, 2006 12:00 AM
Access Security ru1 Access 0 June 1st, 2005 02:28 PM
Access Security stephanel Access 1 January 5th, 2004 04:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.