PC Review


Reply
Thread Tools Rate Thread

demand assembly security

 
 
sazonov dmitry
Guest
Posts: n/a
 
      11th May 2005
I started to use FxCop and it is a pain: code security.

FxCop told me to add minimum security and my code is not
working anymore.

now it crashing on
string machine = System.Environment.MachineName;

I tried to add

[assembly: EnvironmentPermission
(SecurityAction.RequestMinimum, Unrestricted=true)]

but it did not help. What should I do?

thanks
 
Reply With Quote
 
 
 
 
Nicole Calinoiu
Guest
Posts: n/a
 
      12th May 2005
A few questions:

1. Is the RequestMinimum for Environment permission the only assembly-level
permission attribute in your assembly? If not, could you please post the
complete list?

2. Is this a library assembly that is being called from another
application? If so, could it be that this application (or any intermediary
library) lacks unrestricted EnvironmentPermission, either due to CAS policy
or assembly-level permission attributes?

3. Do any methods on the call stack apply a PermitOnly or Deny for any
permissions?



"sazonov dmitry" <(E-Mail Removed)> wrote in message
news:03c401c55666$672de0c0$(E-Mail Removed)...
>I started to use FxCop and it is a pain: code security.
>
> FxCop told me to add minimum security and my code is not
> working anymore.
>
> now it crashing on
> string machine = System.Environment.MachineName;
>
> I tried to add
>
> [assembly: EnvironmentPermission
> (SecurityAction.RequestMinimum, Unrestricted=true)]
>
> but it did not help. What should I do?
>
> thanks



 
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
Security.PrincipalPermission.Demand() Jeroen Microsoft C# .NET 3 15th Jan 2008 12:32 PM
assembly security SharpCoderMP Microsoft C# .NET 0 1st Sep 2006 03:59 PM
C-sharp demand on par with Assembler - Apache releases a Java app server (Re: Skills in most demand) asj Microsoft VB .NET 189 8th Jul 2004 08:48 PM
Yet another study says: Java is most in demand (Re: C-sharp demand on par with Assembler) asj Microsoft C# .NET 3 16th Jun 2004 07:51 AM
Assembly Security Philip Carnstam Microsoft C# .NET 1 30th Nov 2003 03:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:21 PM.