SuppressUnmanagedCodeSecurity

  • Thread starter Thread starter Michael Tissington
  • Start date Start date
M

Michael Tissington

I'm having trouble using the SuppressUnmanagedCodeSecurity attribute.

When I try to compile, I get an error saying that the namespace is not
known.

Any ideas please ?
 
Seems odd, Michael. The following compiles fine, so I'm guessing some
other problem exists.


using System.Security;

[SuppressUnmanagedCodeSecurity]
public class NativeMethods
{
// ...
}
 
Hi Michael,

As for the "namespace not known..." error when you try using the
SuppressUnmanagedCodeSecurity Attribute , I think it may be caused by the
namespace of the SuppressUnmanagedCodeSecurity class is not imported in
your code file. Have you add the folloing line in your code file:

using System.Security;

or Imports System.Security for VB.NET

The SuppressUnmanagedCodeSecurity class is under the "System.Security
namespace" so we have to import the namspace if we don't specify the full
class name like:

System.Security.SuppressUnmanagedCodeSecurity

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| From: "Michael Tissington" <[email protected]>
| Subject: SuppressUnmanagedCodeSecurity
| Date: Sat, 3 Dec 2005 22:08:15 -0800
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
| Message-ID: <e9i4ckJ#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 65.249.55.7
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:362561
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I'm having trouble using the SuppressUnmanagedCodeSecurity attribute.
|
| When I try to compile, I get an error saying that the namespace is not
| known.
|
| Any ideas please ?
|
| --
| Michael Tissington
| http://www.oaklodge.com
| http://www.tabtag.com
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top