PC Review


Reply
Thread Tools Rate Thread

Debuging Attributes in c#

 
 
James Bolles
Guest
Posts: n/a
 
      14th Aug 2003
I have visual studio and I am trying to create a
Attribute permission that is enforced when the method is
called. However, it is never being fired. I have
compiled the attribute cs in release mode, placed the dll
in the gac, and registered the dll with the caspol.
Still, it does not work.

Is there anyway to write codeaccesssecurity permission
and debug them? Can you disable the security all
together to debug the application first?

Thanks,
James
 
Reply With Quote
 
 
 
 
Tian Min Huang
Guest
Posts: n/a
 
      15th Aug 2003
Hello James,

As I understand, you create a custom code access permission and make
declarative demands for your custom permission. And now you cannot debug
the methods which are enforced by the custom permission. Please correct me
if there is any misunderstanding. I'd like to share the following
information with you:

As you know, default security policy does not know about the existence of
any custom permission. You have to update security policy to make it know
your custom permission. After that, we can grant FullTrust to either the
share or the individual assemblies. Please refer to the following articles
and resources:

Updating Security Policy
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconupdatingsecuritypolicy.asp

<http://msdn.microsoft.com/library/de...-us/cpguide/ht
ml/cpconsecuritypolicybestpractices.asp> for .NET framework security best
practices. It has several good links.

How to trust a specific share:
http://msdn.microsoft.com/library/de...us/vsintro7/ht
ml/vxurfprojectfoldernotsecuredialogbox.asp

<http://msdn.microsoft.com/library/de...-us/cptools/ht
ml/cpgrfcodeaccesssecuritypolicyutilitycaspolexe.asp?frame=true> has a
really good description for the Caspol command line syntax.

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! ¨C www.microsoft.com/security
This posting is provided Ħ°as isĦħ with no warranties and confers no rights.


 
Reply With Quote
 
James Bolles
Guest
Posts: n/a
 
      17th Aug 2003
Thanks for the response, HuangTM. It turns out the way I was trying to
register my custom permission into the caspol was incorrect. I was
doing caspol -af assemblyname.dll but that we was not enough. I ended
up using the caspol wizard and telling it I wanted it installed on the
local machine as a fully trusted assembly and it works.

However, do you know of a way to debug code when you have problems like
this? I was unaware if you could have an item in the GAC and allow it
to be debugged.

Thanks for you time.
James



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data value display attributes linked to table attributes MDT at Paragon Home Inspections, LLC Microsoft Excel Charting 0 15th Nov 2006 12:53 AM
Debuging Tom McL. Microsoft VB .NET 3 5th May 2005 03:31 AM
Upgrade W2K -> W2K3, Mangled Attributes, Can't find attributes =?Utf-8?B?Tmljay1NYXJz?= Microsoft Windows 2000 Active Directory 0 10th Feb 2005 10:43 PM
Setting some file attributes doesn't work with FileInfo.Attributes =?Utf-8?B?Sm9obiBSLg==?= Microsoft C# .NET 7 18th Nov 2004 09:17 AM
Debuging by value Jason Microsoft C# .NET 8 1st Oct 2004 10:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 PM.