SocketPermissionAttribute クラス
アセンブリ: System (system.dll 内)

<SerializableAttribute> _ <AttributeUsageAttribute(AttributeTargets.Assembly Or AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Constructor Or AttributeTargets.Method, AllowMultiple:=True, Inherited:=False)> _ Public NotInheritable Class SocketPermissionAttribute Inherits CodeAccessSecurityAttribute
[SerializableAttribute] [AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple=true, Inherited=false)] public sealed class SocketPermissionAttribute : CodeAccessSecurityAttribute
[SerializableAttribute] [AttributeUsageAttribute(AttributeTargets::Assembly|AttributeTargets::Class|AttributeTargets::Struct|AttributeTargets::Constructor|AttributeTargets::Method, AllowMultiple=true, Inherited=false)] public ref class SocketPermissionAttribute sealed : public CodeAccessSecurityAttribute
/** @attribute SerializableAttribute() */ /** @attribute AttributeUsageAttribute(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method, AllowMultiple=true, Inherited=false) */ public final class SocketPermissionAttribute extends CodeAccessSecurityAttribute

この属性を使用するには、Socket 接続が、SocketPermissionAttribute で指定したプロパティに準拠している必要があります。たとえば、ポート 80 の Socket 接続にアクセス許可を適用するには、SocketPermissionAttribute の Port プロパティを "80" に設定します。SocketPermissionAttribute で指定されたセキュリティ情報は、SocketPermissionAttribute が適用されるクラスである属性ターゲットのメタデータに格納されます。その後、システムは、実行時にその情報にアクセスします。コンストラクタに渡される SecurityAction により、許容される SocketPermissionAttribute ターゲットが決定されます。
![]() |
---|
SocketPermissionAttribute のプロパティは、null 参照 (Visual Basic では Nothing) 以外の値に設定する必要があります。また、プロパティの値は一度設定したら、変更できません。 |

System.Attribute
System.Security.Permissions.SecurityAttribute
System.Security.Permissions.CodeAccessSecurityAttribute
System.Net.SocketPermissionAttribute


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSocketPermissionAttribute クラスを検索する場合は、下記のリンクをクリックしてください。

- SocketPermissionAttribute クラスのページへのリンク